Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fso - open directories and copy contents
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Fso - open directories and copy contents
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:
01593241
Message ID:
01593241
Vues:
49
I'm not getting very far with this. Can anyone please lend a hand and fill in the blanks where they can
I have a vault full of backup directories each start with FP and end with date and time reference.
I want to access the latest directory in the group - open the directory and copy all the files within to a temp directory
then move to the next directory and do the same.

Here is what I have - in over my head here I'm afraid - thanks for any help.
k
fso = CREATEOBJECT("Scripting.FileSystemObject")
lnNum =adir(ladir,'c:\vault\FP*','D')  &&& 'Directory names that start with FP
	asort(ladir,3)  &&& XXX i need reverse sort so that latest directory shows up first

	for each ladir in 'c:\vault'  &&& XXX  go through each directory

        open directory ???
    
	FSO.CopyFile()  &&& copy all files in directory to c:/temp 
	
endfor
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform