Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

How to get a complete List directory ?

5 réponses
Avatar
Gege
Is there a program that I can use to have a file list of a specific folder,
which will display alltogether the creation dates, the modified date and
the last accessed date ?

Thanks

Gege

5 réponses

Avatar
Georges MAUREL
Hello Gege
Try this...

Dim path, fso, f, file, f1, Myfile

path="c:temp"

Set fso = CreateObject("Scripting.FileSystemObject")

Set MyFile = fso.CreateTextFile("c:list.txt", True)

Set f = fso.GetFolder(path)
Set fc = f.Files
For Each f1 in fc
v_name = path & f1.name
msgbox v_name
set fil=fso.GetFile(v_name)
MyFile.WriteLine f1.name & " - " &_
"Created : " & fil.DateCreated &_
" - Last access : " & fil.DateLastAccessed &_
" - Last modified : " & fil.DateLastModified
Next

MyFile.Close

Regards
Georges

PS : here it's a french forum, you could have tried to write in french...



"Gege" a écrit dans le message de news:

Is there a program that I can use to have a file list of a specific
folder,
which will display alltogether the creation dates, the modified date and
the last accessed date ?

Thanks

Gege


Avatar
Jacques93
Bonjour Gege,
Is there a program that I can use to have a file list of a specific folder,
which will display alltogether the creation dates, the modified date and
the last accessed date ?

Thanks

Gege


Set args = WScript.Arguments
ListFolder args(0)

Private Sub ListFolder(fldName)
Dim fso, fld, fi

Set fso = CreateObject("Scripting.FileSystemObject")
Set fld = fso.GetFolder(fldName)
For Each fi In fld.Files
Wscript.Echo fi.Name & vbtab & fi.DateCreated & vbtab &
fi.DateLastAccessed & vbtab & fi.DateLastModified
Next
End Sub


--
Cordialement,

Jacques.

Avatar
Gege
Merci Georges, je n'avais pas vu que c'était un forum français.
En réalité, je recherche un programme de type xxx.exe que je pourrais
invoquer à partir d'un programme écrit dans un langage de programmation (pas
nécessairement du VB). Par exemple, Cobol, Java, etc.

Merci tout de même

Gege

"Georges MAUREL" wrote:

Hello Gege
Try this...

Dim path, fso, f, file, f1, Myfile

path="c:temp"

Set fso = CreateObject("Scripting.FileSystemObject")

Set MyFile = fso.CreateTextFile("c:list.txt", True)

Set f = fso.GetFolder(path)
Set fc = f.Files
For Each f1 in fc
v_name = path & f1.name
msgbox v_name
set fil=fso.GetFile(v_name)
MyFile.WriteLine f1.name & " - " &_
"Created : " & fil.DateCreated &_
" - Last access : " & fil.DateLastAccessed &_
" - Last modified : " & fil.DateLastModified
Next

MyFile.Close

Regards
Georges

PS : here it's a french forum, you could have tried to write in french...



"Gege" a écrit dans le message de news:

Is there a program that I can use to have a file list of a specific
folder,
which will display alltogether the creation dates, the modified date and
the last accessed date ?

Thanks

Gege







Avatar
Do Re Mi chel La Si Do
Hi !

Is there a program ?
And an "internal command", it's OK ?




You can use :
DIR /N /TA :: dernier accès
DIR /N /TC :: création
DIR /N /TW :: dernière écriture

Thanks
De rien




MCI



Avatar
Gege
Je connaissais /TA et /TC, mais j'espérais que Microsoft, depuis le temps on
l'on tourne en 32 puis 64 bits, avait un programme qui pouvait renvoyer
tout sur une seule ligne. Mais je ne suis pas vraiement étonné.


"Do Re Mi chel La Si Do" wrote:

Hi !

Is there a program ?
And an "internal command", it's OK ?




You can use :
DIR /N /TA :: dernier accès
DIR /N /TC :: création
DIR /N /TW :: dernière écriture

Thanks
De rien




MCI