Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy all BUT
Message
From
06/05/2014 14:34:38
 
 
To
06/05/2014 02:45:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01599588
Message ID:
01599636
Views:
39
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
>>>>
Previous
Reply
Map
View

Click here to load this message in the networking platform