Here is a VBS Script that, you Drag & Drop the folder that you want to list in below format. This will
go threw all Folders And Sub Folders, and list all contents.
Quote
Source Folder Path
1\ Name
2:\ Created
3\ Accessed
4\ Modified
Save As List_File_Directory.vbs
'-> Object For Run Time
Dim Act :Set Act = CreateObject("Wscript.Shell")
Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject")
'-> Varibles For Script Run Time
Dim Ar, Dr, Ln, Ts, Txt
Ar = Chr(160) & Chr(187) & Chr(160)
Ln = "--------------------------------------------------------"
'-> Makes Sure Only One Object Drag And Drop
Select Case WScript.Arguments.Count
Case 0
call Msg(vbTab & "Error No Folder" & vbCrLf & _
"To Use This Script Drag And Drop An" & vbCrLf & _
"Single Folder Onto This Script.","Error 1")
Case 1
'-> Filter Out File From Folder
If Right(InStr(WScript.Arguments.Item(0),"."),6) Then
call Msg(Space(26) & "File Drag Drop" & vbCrLf & _
" You Have Drag & Drop A File Onto This Script." & vbCrLf & _
"Script Requires Only One Folder To Be, Drag &" & vbCrLf & _
"Drop To Make Active","Error 3")
Else
Dr = WScript.Arguments.Item(0)
call Msg("Preparing To List This Folder : " & Dr, "List Contents", 4128)
Txt = Act.SpecialFolders("DeskTop") & "\List_Item.txt"
Set Ts = Fso.CreateTextFile(Txt)
Ts.writeline vbTab & "Scan Time" & Ar & Time()
Ts.writeline vbTab & "Scan Date" & Ar & Date()
Ts.writeline vbTab & "Scan Path" & Ar & Dr
Recursive(Fso.GetFolder(Dr))
Ts.WriteLine Ln
Ts.Close
Act.Run(Txt),1,True
call Msg("Did You Want To Keep This File : " & Fso.GetFile(Txt).Name & vbCrLf & _
"No To Delete This File, Yes To Keep File If Nothing Is Select" & vbCrLf & _
"In 5 Seconds, This Script Will Close And Save The File","Yes To Keep - No To Delete",4132)
End If
Case Else
call Msg(Space(25) & "Error Exceeds Limit" & vbCrLf & _
" User Has Drag And Drop " & WScript.Arguments.Count & _
" Objects On To This Script." & vbCrLf & "This Script Was Meny To" & _
" Process Only One Folder, At" & vbCrLf & " Script Run Time", _
"Error 2", 4128)
End Select
'-> Msgbox Function With 5 Second TimeOut
Function Msg(Tx, Tn, Btn)
Select Case Btn
Case 4128
Act.Popup Tx, 5, Tn, 4128
Case 4132
If Act.Popup(Tx, 5, Tn, 4132) = 7 Then Fso.DeleteFile(Txt), True
End select
End Function
'-> Recusive Threw Folder And All Sub Folders
Function Recursive(Folder)
Ts.WriteLine Ln
Ts.WriteLine " Folder Path " & Ar & Folder
For Each Obj In Folder.Files
Ts.WriteLine Ln
Ts.WriteLine " File Name " & Ar & Obj.Name
Ts.WriteLine " Date Created " & Ar & Obj.DateCreated
Ts.WriteLine " Last Accessed" & Ar & Obj.DateCreated
Ts.WriteLine " Last Modified" & Ar & Obj.DateCreated
Next
For Each Dir In Folder.subFolders
Recursive(Dir)
Next
End Function
Rename List_File_Directory.vbs.txt to List_File_Directory.vbs to make active