Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fdate(not working)
Message
 
À
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:
01632252
Vues:
37
Yes I should have read in the report that the path was not being included as Antonio pointed out. I do like your shortcut to retrieve data however 3,4. Where you get all this stuff I don't know, but this is a gold mine for me. Thanks very much Dragan for taking the time to explain all, it's always an education.
karen


>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform