How to list all files and directories in Windows
XP drive and save it to a file
Yesterday I had this thing, by accident because of some
misconfiguration of the domain controller here in the university. I
can read some files and folders which were belonging to students
and teachers here in the university. We had some great fun with my
good old friend David. In checking up some trashy stuff. It was
rather interesting that one of the directory listings actually
contained all the teachers computer usernames with it, therefore I
needed a quick way to make all the files listing stored in a file
in order to be able to later have this usernames listing stored in
an MySQL or some other kind of database, after consulting few
websites I came to the command to
list all files and directories
in the mapped sharing.
We first used the net use //workgroup/ J: to map the sharing in the
workgroup and later we used the dir command as shown below to list
all files and directories and store the data in a file.
So here is how you can also come with all your files and
directories in your Windows drive stored in a file:
dir J:\ /s > c:\somepath\j_file.txt
Now if the files and directory is not too long you will have
everything stored in j_file.txt in a couple of minutes time,
however in our case the directory listing was huge so we had to
wait for an hour and still the file was filling in :)