Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fdate(not working)
Message
De
28/02/2016 05:55:29
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01632238
Message ID:
01632241
Vues:
106
This message has been marked as the solution to the initial question of the thread.
>I am not getting the date of the file. Have I set it up incorrectly?
>It correctly lists the files but not the date
>tnx for any suggestions
>k
>
>fso = CREATEOBJECT("Scripting.FileSystemObject")
>lnNum =adir(ladir,'c:\Backup\FP*','D')
>asort(ladir,3) 
>FOR nCount = 1 TO lnNum  && Loop for number of databases
>  		? LADIR(nCount,1)
>  		? FDATE(LADIR(nCount,1))
>endfor	
>


The array you get from the aDir() contains filenames without the path. You'd have to
? fdate(forcepath(laDir[nCount, 1], "c:\backup"))
But then it's unnecessary, as laDir[nCount, 3] contains the date, and laDir[nCount, 4] the time of the file.

Or, if you're already using fso
loDir=fso.getFolder("c:\backup")
for each loFile in loDir.files
	? oFile.name, oFile.datecreated
endfor
If you track this in the debugger, you'll see there are many other properties of oFile that you can use, and things you can do with it. Perhaps debugger won't show all of them, but then intellisense will. Just type "oFile." in the command window and you'll see.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform