Software to snap file list
June 13, 2006 5:10 PM   Subscribe

What software can produce on disk a list of all files on the hard drive (including hidden and system files) and display the result in a nested hierarchy like Windows Explorer?

Essentially what I want is something that will take a snapshot of the files and their filestamp information, and print it to a file so that it can be copied or moved for use elsewhere.
posted by megatherium to Computers & Internet (7 answers total) 1 user marked this as a favorite
 
dir /a/s
posted by kcm at 5:15 PM on June 13, 2006


Great question - I'm curious myself because I need a similar application for work. Is there anything out there that not only captures the file names but also basic properties such as the date of the last update and the last user account to make changes?
posted by galimatias at 5:18 PM on June 13, 2006


He specifically said "nested", like explorer. The simplest way to do this is the native windows command, tree
c:\tree c:\ /F

However, this doesn't show detailed file information. If you're looking for things like extended file information (date, size) while still showing the "explorer" like view of tree, you could do that most easily with vbscript so you can format it and display it exactly as you want, and gather the info you want in whichever method appeals to you.
posted by hincandenza at 5:30 PM on June 13, 2006


I have tried many file listing utilities, and none are satisfactory. I still keep an installer for Karen's Directory Printer around, so it is probably the best of the easily googled solutions, but I do not use it and it doesn't fully accomplish what you are asking for.

My solution is to use a batch file to create a text listing of files in a single directory, then use WinRAR to fetch and compress all files with a specific extension (like *.txt). WinRAR can easily scan an entire tree, and its nested directory structure looks almost like Explorer's. WinRAR has a built in search which will look inside text files for you, so you can still 'find' stuff. A nice bonus, you can easily recreate the directory structure whenever you want by extracting.
posted by Chuckles at 5:42 PM on June 13, 2006


Here you go:

If wscript.arguments.count > 0 then
StartFolder = wscript.arguments.item(0)
Set FSO = CreateObject("Scripting.FileSystemObject")
else
wscript.echo "Syntax: showfiles.vbs [folder path]"
wscript.echo "Ex: showfiles.vbs d:\"
End If

' launch the scan from the specified folder
ShowFolder StartFolder, 0

wscript.quit

Sub ShowFolder(StartFolder, i)
On Error Resume Next ' necessary in case a folder has permissions/issues being opened
Set objFolder = FSO.GetFolder(StartFolder)
If Err.Number <> 0 then
Err.Clear
End if

' Gets files in this folder first, determines whether to show them
Set colFiles = objFolder.Files

wscript.echo Space(i) & "\" & UCase(objFolder.Path)
For Each objFile in colFiles
myName = Left(objFile.Name, 39 - i) ' trims super long filenames
myTime = FormatDateTime(objfile.datelastmodified, vbShortDate) & " " & FormatDateTime(objFile.DateLastModified, vbLongTime)

mySize = objfile.size

if (mysize /(1024^2)) < 1 then 'size is less than 1 mbbr> mysize = Round((mysize/1024),1) & " KB"
else
mysize = Round((mysize/(1024^2)),2) & " MB"
end if

wscript.echo Space(i + 1) & "\" & myName & Space(40- len(myname)) & mySize & Space(15-len(mySize)) & myTime
Next

Set colFiles = Nothing

'recursively checks subfolders
For Each SubFolder in objFolder.SubFolders
ShowFolder SubFolder, i + 1
Next
End Sub



Produces this output (which you'll have to trust me is nicely formatted and indented, it just doesn't paste that way into Metafilter):

D:\>showfiles.vbs f:\itunes | more
\F:\ITUNES
\F:\ITUNES\10,000 MANIACS
\F:\ITUNES\10,000 MANIACS\MTV UNPLUGGED
\01 These Are Days.mp3 6.72 MB 8/5/2004 8:23:56 AM
\02 Eat For Two.mp3 6.01 MB 8/5/2004 8:24:16 AM
\03 Candy Everybody Wants.mp3 4.57 MB 8/5/2004 8:24:33 AM
\04 I'm Not The Man.mp3 5.18 MB 8/5/2004 8:24:52 AM
\05 Don't Talk.mp3 7.37 MB 8/5/2004 8:25:19 AM
\06 Hey Jack Kerouac.mp3 5.24 MB 8/5/2004 8:25:38 AM
\07 What's The Matter Here _.mp3 6.66 MB 8/5/2004 8:26:03 AM
\08 Gold Rush Brides.mp3 5.77 MB 8/5/2004 8:26:24 AM
\09 Like The Weather.mp3 5.84 MB 8/5/2004 8:26:42 AM
\10 Trouble Me.mp3 5.06 MB 8/5/2004 8:26:59 AM
\11 Jezebel.mp3 6.04 MB 8/5/2004 8:27:20 AM
\12 Because The Night.mp3 5.12 MB 8/5/2004 8:27:37 AM
\13 Stockton Gala Days.mp3 7.54 MB 8/5/2004 8:28:04 AM
\14 Noah's Dove.mp3 7.04 MB 8/5/2004 8:28:26 AM
\F:\ITUNES\24
\F:\ITUNES\24\SENSATION WHITE 2005
\2-05 The Longest Day (Armin van Buur. 6.93 MB 4/8/2006 4:19:25 PM
\F:\ITUNES\4 NON BLONDES
\F:\ITUNES\4 NON BLONDES\BIGGER, BETTER, FASTER, MORE!
\03 What's Up_.mp3 4.5 MB 9/4/2004 4:31:49 PM
\F:\ITUNES\A CAPELLA
-- More --

posted by hincandenza at 5:57 PM on June 13, 2006


Canonical answer to this question when it's about mp3s: Oidua with the Guidua GUI. I believe you can use it to enumerate all file types as well.
posted by stavrosthewonderchicken at 6:41 PM on June 13, 2006


Try PrintFolders
posted by kaytrem at 9:19 PM on June 13, 2006


« Older Nu Klar!   |   How can I make my new city feel like home? Newer »
This thread is closed to new comments.