Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy very long name files?
Message
General information
Forum:
Windows
Category:
Computing in general
Miscellaneous
Thread ID:
01129491
Message ID:
01129523
Views:
23
>Yuri,
>Thank you very much for your help. Do I understand correctly that I need to use the code you wrote in a VFP program, right?

Not necessarily in VFP.

>Also, how have you determined that the CSIDL_FAVORITES is 6? (my Favorites folder).
For instance, http://vbnet.mvps.org/index.html?http://vbnet.mvps.org/api/_consts/constsc.htm

>
>>VFP or DOS COPY/XCOPY commands do not support/recognize unicode. You may use this instead:
>>
>>
>>oFSO = CREATEOBJECT("Scripting.FileSystemObject")
>>
>>lcpath = space(255)
>>DECLARE SHGetSpecialFolderPath IN SHELL32.DLL ;
>>      LONG hwndOwner, ;
>>      STRING @cSpecialFolderPath, ;
>>      LONG  nWhichFolder
>>CSIDL_FAVORITES= 6   &&Favorites Folder
>>SHGetSpecialFolderPath(0, @lcpath, CSIDL_FAVORITES)
>>lcpath=SubStr(RTrim(lcpath),1,Len(RTrim(lcpath))-1)
>>
>>FOR EACH ofile IN oFSO.GetFolder(lcpath).Files
>>	?ofile.name
>>	ofile.copy("a:\")
>>endfor
>>
>>
>>
>>
>>>I want to copy all my IE Favorites from the computer to a CD (to be used on another computer). But when I attempt to copy them the process is interrupted as soon as COPY command comes across a long file name (I think it is 64 characters long, but I am not sure). I tried using dos XCOPY command but the same problem.
>>>
>>>Any suggestions?
>>>
>>>Thank you.
Previous
Reply
Map
View

Click here to load this message in the networking platform