| | |
Help with copy????
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 3
Reputation:
Solved Threads: 0
Hi Im new to the whole thing of programming and would like to write a C++ program to copy files from one drive to another, any help and suggestions on where to start?
Any help with source code or pointers will be greatly appreciated. The OS the program is for is WINCE 4.2 .net embedded.
Thanks in advance
Any help with source code or pointers will be greatly appreciated. The OS the program is for is WINCE 4.2 .net embedded.
Thanks in advance
To copy a file you basically need to first read that file. To do this read about opening ifstreams as binary files ( http://www.cplusplus.com/reference/i...ream/read.html ), might want to edit that code a bit. Then you'll want to save the contents of what you read to an output file, ofstream is your weapon of choice here ( http://www.cplusplus.com/reference/i...eam/write.html )... In fact the latter link has basically your program... Write some user-input/command line parameter processing around it to allow a user to select the input and output files and hey presto done.
•
•
Join Date: Jun 2007
Posts: 275
Reputation:
Solved Threads: 45
Windows CE has APIs for this kind of thing. The prototype for the function is .
Go to MSDN if you need info on return values, etc. try http://msdn.microsoft.com/en-us/library/ms959899.aspx
C++ Syntax (Toggle Plain Text)
BOOL CopyFile(LPCTSTR lpExistingFileName, LPCTSTR lpNewFileName, BOOL bFailIfExists);
Go to MSDN if you need info on return values, etc. try http://msdn.microsoft.com/en-us/library/ms959899.aspx
![]() |
Similar Threads
- If i use an illegal copy of windows,will it cause problems? (Windows NT / 2000 / XP)
- Server 2003 evaluation copy (Windows NT / 2000 / XP)
- Automating a copy/move (Windows NT / 2000 / XP)
- direct copy (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: string manipulation functions?
- Next Thread: C++ help.
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings struct temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






