Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Better way to copy files
Message
De
07/02/2002 12:18:02
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00616676
Message ID:
00616746
Vues:
27
Michelle,

Ahhh...these are memo fields. The following should work, and will be faster, especially if you are copying a whole bunch of files. EXECSCRIPT() has to compile the line each time it executes.
local lcFromPath, lcToPath

lcFromPath = alltrim(mFromPath)
lcToPath = alltrim(mToPath)
copy file (lcFromPath) to (lcToPath)
>The variables are actually fields in a table with a list of files and where they need to be copied to. The contents vary, but it seems to be having a space in the file names that kill it.
>
>Aha! I just found a way to do it. I went over to copy the code for you and noticed in the last thing I tried to do, I forgot the word "FILE". I added that and it worked. (That wasn't the problem in the original code, just the latest experiment)
>
>Here's how it's working:
>
>lcCommand = [COPY FILE"]+mFromPath+[" TO "]+mToPath+["]
>EXECSCRIPT(lcCommand)
>
>Thanks,
>
>Michelle
>
>
>>Michelle,
>>
>>The syntax you are using should work, assuming filevar1 and filevar2 are character expressions and the files exist.
>>
>>How are these two variables created (can you post more code)? Please post what their contents are when it fails...
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform