New
#1
I'd like to generate a list with *only* file names
- Winkey, “cmd”
- “cd e:\media\trainingvids”
- “dir *.* /s /b /a -d > c:\temp\dork.txt”
So, with that I'm opening a command prompt, changing to the correct directory, doing a directory listing of all files (including sub-directories (/s), no headers or footers so 'bare' format (/b), and trying to NOT display the directory (/a -d) – and then sending/piping that (>) to a file I've designated to be named and created (dork.txt) in a temporary directory (\temp) that already exists on my c:\.
The problem is that it doesn't work. I'm not able to find a way to NOT include the full path along with the file names. I want a resultant file that JUST has the full file names, and could use some quick help with syntax, or maybe I've got it all wrong and it can't be done in this way.
I need the process to work for both Windows 10 and Windows 7 machines, so hopefully there is no difference in the DOS syntax between the two, as I know there were slight differences with much older DOS versions.
Of course, if there are sexy new ways to achieve this list in Windows 10, I'm all ears.
Reference:
- dir (command) - Wikipedia, the free encyclopedia
Last edited by FoxyBoxOfRox; 03 Jan 2016 at 17:10.