filename to string


 
Thread Tools Search this Thread
Top Forums Programming filename to string
# 1  
Old 07-22-2007
filename to string

working with the Win32API
I am trying to implement a function in my program that will take the full

filename and path of a shortcut (.lnk) file and returns an std::string that is

the path+filename+arguments of the program to run, and also a STARTUPINFO

structure that can be passed to CreateProcess along with the string.
Anyways, it requires shobjidl.h and shobjidl.idl, neither of which come with

Dev-C++ 4.9.9.2. If I had these files, or if I had MSVC++, I could use MSDN's

example and be on my way. But I don't have either of those. Is there any way to

resolve (run the program) from a shortcut with Dev-C++?

Shashidhar Iddamsetty
# 2  
Old 07-22-2007
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to grep for a string on a FILENAME?

I call my bash shell script "test.sh" and pass "admin_usr.txt" as an argument like below. ./test.sh admin_usr.txt Inside the "test.sh" i wish to check if the filename passed "admin_usr.txt" i.e "$1" contains the string "admin" or not ... which in this case it does. Note: I do not wish to... (5 Replies)
Discussion started by: mohtashims
5 Replies

2. Shell Programming and Scripting

Extract filename from a given string

I want to extract the filename from a string. This is how I have the rawdata ina file /home/sid/ftp/testing/abc.txt /home/sid/ftp/tested/testing/def.txt /home/sid/sftp/date/misc/hij.txt i want a script which would provide me an output like this Directory ... (10 Replies)
Discussion started by: sidnow
10 Replies

3. Shell Programming and Scripting

Extract string from filename

Hi I need to extract the string from file name filename: FILENAME_STRUT_01032013_XXXXXXX.TXT I want 01032013 from the above file name. number of characters may differ before the required string but underscores(-) are same number i.e. after second underscore. Please advise on this. ... (2 Replies)
Discussion started by: cnrj
2 Replies

4. UNIX for Dummies Questions & Answers

awk for a string in a filename

Hi there I have the variable command below in a script to list the file name in a directory:FILEN="$(ls <PATH> | awk '{print $1}')". When it is run, it correctly returns the following:. I would like to be able to cut the date/time portion of the filename and store it as a variable for later... (4 Replies)
Discussion started by: jimbojames
4 Replies

5. Shell Programming and Scripting

grep exact string from files and write to filename when string present in file

I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies

6. Shell Programming and Scripting

Append string to filename

Hi, i wrote the script like... v_date=`date "+%Y%m%d"`; v_date1="rejects_"$v_date'.txt'; echo $v_date1; awk -F\| 'NF==4{ print $0>$v_date1;next} NF!=4 {print $0 >"murali.txt";next}' test1.txt while append data into file as coming like file is $v_date1,but i want data into file... (4 Replies)
Discussion started by: bmk
4 Replies

7. Linux

Find String in FileName and move the String to new File if not found

Hi all, I have a question.. Here is my requirement..I have 500 files in a path say /a/b/c I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies

8. Shell Programming and Scripting

remove the filename from a string

I have a string like this /Development/ST/st000001su/Outbound/Prod/PROD-732QCJ/63acf2caf91bc136cb9bcce8a85c7fa8/PGP/PGP.txt I want to remove the PGP.txt and I want only the /Development/ST/st000001su/Outbound/Prod/MCFR-732QCJ/63acf2caf91bc136cb9bcce8a85c7fa8/PGP returned. I saw an command... (2 Replies)
Discussion started by: srini0603
2 Replies

9. UNIX for Dummies Questions & Answers

Replacing string with filename

Hi All, I've recently run a script that inserts the filename into all files of my active directory. Now I want to move the filename string and have it replace text a few lines down. In other words, here's what I'm trying to do. Here is a file called 'goodtimes': " goodtimes Hi, Welcome... (1 Reply)
Discussion started by: calrog
1 Replies

10. Shell Programming and Scripting

Parse and replace string in filename

Hi, I've a filename of this format: "XXX_XXX_TXT.TAR.AS". Need to change the name into this format: "XXX_XXX.TAR.AS". This file resides in a directory. I'm ok with using the find command to search and display it. Essentially I just need to replace the string "_TXT.TAR.AS" to ".TAR.AS". Is awk... (17 Replies)
Discussion started by: chengwei
17 Replies
Login or Register to Ask a Question