|
-
August 6th, 1999, 05:27 AM
#1
Which Command line to use in VC program to copy files from drive C: to Drive A
Dear All,
I am trying to write a code for which on click of a button I want to copy files from drive C: to drive A:
I do not know which command to use. Is it something like "ShellCopy "
Pleaee write me this line of code if you have come across it.
If you can please write a dummy code which I can just copy.
Any help will very much be appreciated.
Please reply to author
Kind Regards
Qasim Raza Iqbal
-
August 6th, 1999, 06:26 AM
#2
Re: Which Command line to use in VC program to copy files from drive C: to Drive A
you can use the SHFileOPeration API and use the FO_COPY flag
-
August 9th, 1999, 04:48 AM
#3
Re: Which Command line to use in VC program to copy files from drive C: to Drive A
Dear Sir, I have used the following line and I get errors please see if you could help me Thanks.
SHFileOperation(NULL, FO_COPY, _T("\\SOFTWARE\\ide\\idebat.bat"),"a:\\",NULL);
Please reply to author
Kind Regards
Qasim Raza Iqbal
-
August 9th, 1999, 04:51 AM
#4
Re: Which Command line to use in VC program to copy files from drive C: to Drive A
try this
SHFileOperation(NULL, FO_COPY, _T("\\SOFTWARE\\ide\\idebat.bat"),"a:\\idebat.bat",NULL);
and always check for errors using GetLastError and FormatMessage to get a readable error text.
-
August 9th, 1999, 04:51 AM
#5
Re: Which Command line to use in VC program to copy files from drive C: to Drive A
Hi Qasim,
of course you get an error message becuase SHFileOperation takes only one argument of type LPSHFILEOPSTRUCT, a poiner to a structure. But why don't you use the API function CopyFile simply?
Martin
-
August 9th, 1999, 05:42 AM
#6
Re: Which Command line to use in VC program to copy files from drive C: to Drive A
Hi Martin,
Thanks for the above advice. Please if you could write that line of code I want to copy a file from drive c:\ software to a:\
Your Help will very much be appreciated.
Please reply to author
Kind Regards
Qasim Raza Iqbal
-
August 9th, 1999, 05:47 AM
#7
Re: Which Command line to use in VC program to copy files from drive C: to Drive A
Try thsi:
CopyFile("c:\\software\\idle.bat", "a:\\idle.bat", FALSE);
Let me know if this help u
Regards,
Ovidiu
-
August 9th, 1999, 06:37 AM
#8
Re: Which Command line to use in VC program to copy files from drive C: to Drive A
Thanks Mate SORTED
Please reply to author
Kind Regards
Qasim Raza Iqbal
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|