07-02-2016, 04:33 AM
Hey guys I have been looking all day to find a command which will list all files on a drive including files in sub folders and save the list to a file.
I create a .bat file from notepad with these instructions and run the bat file from the root of the drive which contains the files and sub folders.
dir /b /s /a:-d >list.txt
I get a file called list.txt with entries like this
E:\New Movies\The file test.mp4
But I would like to just have it list like this
The file test.mp4
I dont need to know the directories, file only. and for some reason when run on an external hard drive It picks up the recycled folder like this,
E:\$RECYCLE.BIN\S-1-5-21-2095992690-2580178275-4034271705-1001\$I3EZY6W.avi
I want to scrub that out as well.
Cheers for any help.
I create a .bat file from notepad with these instructions and run the bat file from the root of the drive which contains the files and sub folders.
dir /b /s /a:-d >list.txt
I get a file called list.txt with entries like this
E:\New Movies\The file test.mp4
But I would like to just have it list like this
The file test.mp4
I dont need to know the directories, file only. and for some reason when run on an external hard drive It picks up the recycled folder like this,
E:\$RECYCLE.BIN\S-1-5-21-2095992690-2580178275-4034271705-1001\$I3EZY6W.avi
I want to scrub that out as well.
Cheers for any help.