Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy all BUT
Message
De
06/05/2014 14:34:38
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01599588
Message ID:
01599636
Vues:
40
From the command line, one could do something along the lines of:

for %f in (c:\mydir\*.Dbf) do if not "%~nxf"=="nomove.dbf" copy "%f" \\computer2\dir2

A pure VFP solution would be to use ADIR() to get filenames, then iterate through the array listing and conditionally perform the COPY FILE.

>Good thought Al. Logical approach and a lot shorter than the solution I was using. I was rather hoping for a 'copy x to y FOR' solution but that option doesn't seem to exist for complete files.
>thanks
>k
>
>
>>In case anyone else has the same question, you could rename nomove.dbf to nomove.zzz, do the copy of all .dbfs, then rename it back to nomove.dbf.
>>
>>>Please ignore last line seeking alternate suggestions - I used an old solution posted to me on another issues using an array and scripting code
>>>and which works fine in this case.
>>>so ignore the line: 'If not any suggestions would be greatly appreciated.'
>>>
>>>with thanks
>>>k
>>>
>>>
>>>>I am copying a set of dbf files from one computer to another on a regular basis.
>>>>I want ALL dbf files transferred but one: 'nomove.dbf'
>>>>Is there a way to modify the command below to include all dbf files but the nomove.dbf
>>>>If not any suggestions would be greatly appreciated.
>>>>
>>>>tnx
>>>>k
>>>>
>>>>Copy File c:\mydir\*.Dbf To \\computer2\dir2
>>>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform