Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy File Weird
Message
De
08/11/1999 21:33:26
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00288737
Message ID:
00288838
Vues:
14
>This isn't working, is there a better/best way to do this with/out macro expansion?
>
>
>cPath = alltrim(ThisForm.cDBCPath1.Value)
>Local cShortPath, nSPathLen
>DECLARE INTEGER GetShortPathName IN KERNEL32 ;
>STRING lpszLongPath, STRING lpszShortPath, INTEGER cchBuffer
>cShortPath = Replicate(chr(0),512)
>nSPathLen = GetShortPathName(Fullpath(cPath), @cShortPath, 512)
>cShortPath = Left(cShortPath, nSPathLen)
>   	copy file sys(2023)+'\*.cdx' to &cShortPath
>	copy file sys(2023)+'\*.cdx' to &cShortPath
>	copy file sys(2023)+'\*.dbc' to &cShortPath
>	copy file sys(2023)+'\*.dbf' to &cShortPath
>	copy file sys(2023)+'\*.dct' to &cShortPath
>	copy file sys(2023)+'\*.dcx' to &cShortPath
>	copy file sys(2023)+'\*.fpt' to &cShortPath
>
>
>Thanks for looking.

Try your COPY commands like this:

COPY FILE (SYS(2023)+'\*.fpt') to (cShortPath)

But to be honest, I would have handled this with ADIR, to get the real file names, and just loop through and copy each one. Also, if you surround the file name with quotes, you don't have to get the DOS name.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform