Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy latest files only
Message
 
À
11/10/2012 14:41:43
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01554753
Message ID:
01554857
Vues:
66
oh ok. thanks Al. actually Tore gave me a fantastic solution using the adir() that you suggested and that now works beautifully.

thanks so much for your suggestions - i will look into Robocopy.

k
>Robocopy is not a VFP command, it's a Windows command-line utility that you execute from a CMD window. It's included by default in Vista and later, and available via download for XP.
>
>You can use the VFP RUN command to run this utility, or the ShellExecute API. If you do this you may need to explicitly call the command processor e.g.
>
>
>lcCommand = "CMD.EXE /C ROBOCOPY C:\work C:\destination /move /minage:14"
>
>RUN &lcCommand
>
>You can achieve what you want to do with pure VFP, using ADIR() etc. but it takes more work.
>
>>thanks for the suggestion Al - following up on it.
>>little confused about how this works with vfp - do i need to download the program file - do i use this outside vfp environment?.
>>vfp did not seem to recognize the command - i knew it looked too simple - too good to be true.
>>
>>ROBOCOPY C:\work C:\destination /move /minage:14
>>k
>>
>>
>>
>>>>in order to keep user computers up to date i zip the complete array of program files into a directory then send them along as zip attachment in email.
>>>>problem is i have been sending the whole lot each time. what i want to do is just send the programs that have only been changed within the last month
>>>>
>>>>current command is the basic copy
>>>>
>>>>Copy File c:/myfolder/*.prg To c:\myzipfolder
>>>>
>>>>a) how would i modify this command to skip over programs that show no change within last 30 days
>>>>or
>>>>b) would it be better to copy all then sort by date in the zip directory then delete those older ones.
>>>
>>>If you can use the CMD line, you could use the Robocopy utility with the /MAXAGE: switch: http://ss64.com/nt/robocopy.html
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform