Click here to Skip to main content
15,888,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: #include dependency reduction Pin
Chris Richardson11-Jan-04 0:03
Chris Richardson11-Jan-04 0:03 
Questionwhat is c++ ?? Pin
Anonymous10-Jan-04 4:22
Anonymous10-Jan-04 4:22 
AnswerRe: what is c++ ?? Pin
Maximilien10-Jan-04 5:07
Maximilien10-Jan-04 5:07 
GeneralRe: what is c++ ?? Pin
Jörgen Sigvardsson10-Jan-04 7:17
Jörgen Sigvardsson10-Jan-04 7:17 
AnswerRe: what is c++ ?? Pin
DaFrawg11-Jan-04 5:54
DaFrawg11-Jan-04 5:54 
AnswerRe: what is c++ ?? Pin
Jijo.Raj11-Jan-04 18:33
Jijo.Raj11-Jan-04 18:33 
QuestionHow can I rename random files? Pin
tadees10-Jan-04 1:43
tadees10-Jan-04 1:43 
AnswerRe: How can I rename random files? Pin
Antti Keskinen10-Jan-04 2:36
Antti Keskinen10-Jan-04 2:36 
First, the file enumeration. You can use the MFC class CFileFind to enumerate a directory for files. You can extract each filename in question seperately from the object, there is a member function available that will return the filename of a matching file.

Using this filename, you open the file into a CFile object. Then, you construct and create a new CFile object to the target directory. After that, it is just reading from the first CFile stream and writing into the second one.

Alternatively, if you are not bound to platform-independency (that is, you can use system console commands), then you should consider using the system to copy files directly. For example, commanding system("copy *.* <target dir> ) would copy all files to the target directory on a Windows platform.

See the documentation for CFile and CFileFind. These MFC classes encapsulate the Win32 API concepts File and FileFind. Both MFC documentations have links to the respective Win32 ones if you are unable to use MFC.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
AnswerRe: How can I rename random files? Pin
Ernesto D.10-Jan-04 14:54
Ernesto D.10-Jan-04 14:54 
GeneralNeed Help (detecting file open dialog popup) Pin
Zee man9-Jan-04 22:17
Zee man9-Jan-04 22:17 
GeneralRe: Need Help (detecting file open dialog popup) Pin
Monty210-Jan-04 1:43
Monty210-Jan-04 1:43 
Generalneuronal network Pin
andreas.schaerer9-Jan-04 22:14
andreas.schaerer9-Jan-04 22:14 
GeneralRe: neuronal network Pin
Daniel Turini9-Jan-04 23:13
Daniel Turini9-Jan-04 23:13 
GeneralRe: neuronal network Pin
abc87610-Jan-04 18:36
abc87610-Jan-04 18:36 
GeneralRe: neuronal network Pin
Daniel Turini10-Jan-04 22:23
Daniel Turini10-Jan-04 22:23 
Generalclass member have no valid adress!!please help! Pin
andreas.schaerer9-Jan-04 21:36
andreas.schaerer9-Jan-04 21:36 
GeneralRe: class member have no valid adress!!please help! Pin
valikac10-Jan-04 5:31
valikac10-Jan-04 5:31 
GeneralRe: class member have no valid adress!!please help! Pin
andreas.schaerer10-Jan-04 6:03
andreas.schaerer10-Jan-04 6:03 
GeneralRe: class member have no valid adress!!please help! Pin
valikac10-Jan-04 7:39
valikac10-Jan-04 7:39 
GeneralRe: class member have no valid adress!!please help! Pin
andreas.schaerer10-Jan-04 9:45
andreas.schaerer10-Jan-04 9:45 
GeneralRe: class member have no valid adress!!please help! Pin
Daniel Turini11-Jan-04 2:01
Daniel Turini11-Jan-04 2:01 
GeneralRe: class member have no valid adress!!please help! Pin
DaFrawg11-Jan-04 8:17
DaFrawg11-Jan-04 8:17 
QuestionGetOpenFileName options? Pin
Randy Trulson9-Jan-04 21:02
Randy Trulson9-Jan-04 21:02 
GeneralLooking for an IDE/Editor with source code Pin
Jagadeesh VN9-Jan-04 19:28
Jagadeesh VN9-Jan-04 19:28 
GeneralRe: Looking for an IDE/Editor with source code Pin
John R. Shaw10-Jan-04 8:57
John R. Shaw10-Jan-04 8:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.