![]() |
|
#1
|
|||
|
|||
How to change a filenameHi all,
I would like to rename a bunch of filenames. I use the following command to extract the file name: CPP / C++ / C Code:
My idea is: 1) Open the file. 2) Extract the file name. 3) Change the file name. 4) ?????????. 5) Close the file. Does someone have any idea which steps I should follow at item 4 to achieve this. Thanks in advance. Johan |
|||
|
#2
|
|||
|
|||
Re: How to change a filenameYou need a function to change the name. If this is Windows, you can use MoveFile. Assuming MyFileName is a string of some kind, you'll need to store the new file name in a new variable, or else you'll lose the original file name.
Not knowing much about the environment you're using (ExtractFileName isn't a standard C++ function, nor is there a class in standard C++ that makes reference to dialogs), can't help you much more than that. |
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help fixing my cash register program. | lil_rom | C++ Forum | 5 | 11-Apr-2008 22:23 |
| Exception in thread "main" java.lang.NullPointerException | gedcraw555 | Java Forum | 3 | 25-Feb-2008 09:22 |
| sudoku C++, need lots of help :S | 3shtar | C++ Forum | 3 | 06-Apr-2006 11:10 |
| Accumulating Sums | boousaf | C Programming Language | 12 | 19-Oct-2005 14:27 |
| Cuase the Windows OS to change a filename | Dominic | MS Visual C++ / MFC Forum | 2 | 20-Sep-2005 15:56 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The