Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to copy very long name files?
Message
Information générale
Forum:
Windows
Catégorie:
Informatique en général
Divers
Thread ID:
01129491
Message ID:
01129514
Vues:
19
>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
>
>

When I run this code, I get error
OLE Error code 0x800a0035: Unknow COM status code
on the line ofile.copy("f:\")

Any suggestions of what I may be missing?

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform