|
-
April 27th, 1999, 01:37 AM
#1
copy files
Hello,
Does anybody know how to implement Copy files in our application,
and can be paste in Windows explorer ?
I mean that after copying files in your application ,you can selete munu item "paste" in Windows Explorer to paste the files in selected directory.
Thanks in advanced.
Best Regards
Gloria
-
April 27th, 1999, 03:38 AM
#2
Re: copy files
you can use the SHFileOperation function to copy files. Set the wFunc member of the SHFILEOPSTRUCT structure to FO_COPY.
-
April 27th, 1999, 05:16 AM
#3
Re: copy files
Thank you for your help.
But in SHFILESTRUCT ,member pTo still need to
identify the destination to copy files,but in
Windows Explorer, unless user click paste menu
item,we will have no idea where the destination
will be.
-
April 27th, 1999, 06:17 AM
#4
Re: copy files
Ok, then, I thought it was a two-part question. One for copying files and the other...
Well, if you want to copy the filenames to the clipboard so that explorer "knows" how to paste it, you have to do it via the Clipboard.
You have to register a clipboard format using RegisterClipboardFormat and specify CFSTR_FILENAME as format identifier.
Read the details on MSDN "Clipboard Formats for Shell Data Transfers"
-
May 12th, 2005, 02:36 AM
#5
Re: copy files
I had a similar problem, i try to copy a file in my application which support unicode.
I registered o format
UINT format = Registerclipboardformat(_T("FileName"))
and then i used this format for setting the data on clipboard
Setclipboarddata(format,hclipboarddata)
but it doesnot paste the entire file path(E:\test.txt) on clipboard, instead it pastes only first drive letter for eg E.
could you help me on this?
Regards
Vineet
-
May 12th, 2005, 02:51 AM
#6
Re: copy files
You can also use CopyFile.
-
May 12th, 2005, 06:13 AM
#7
Re: copy files
CopyFile is a scripting function...can it be used in c++??
vineet
-
May 12th, 2005, 06:20 AM
#8
Re: copy files
 Originally Posted by er_vineetb
CopyFile is a scripting function...can it be used in c++??
vineet
CopyFile would be a scripting function or not but there is one CopyFile also in Windows API.
Of course you can use it in C++.
Last edited by ovidiucucu; May 12th, 2005 at 06:28 AM.
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
|