Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fdate(not working)
Message
From
28/02/2016 05:55:29
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/02/2016 03:33:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01632238
Message ID:
01632241
Views:
107
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform