S
Scott Bass
Guest
This post could easily be titled "Why Unix is so much better than
Windows", but that would likely ruffle a few feathers...
I have the following seemingly simple requirements:
1) Directory list of *.foo files, recursive to a particular root
directory
2) Directory list of *.foo files, in the root directory only
The list has to be returned as a full path to the files.
What works (returns full path)
1) dir "C:\Path\To\My\Files\*.foo" /b /s
What fails (returns filename only)
2) dir "C:\Path\To\My\Files\*.foo" /b
I've also investigated the FOR command, it has similar (but different)
shortcomings.
Short of copying a port of the Unix ls command to every user's machine
(not an option), or piping the output from dir into findstr to
overcome its shortcomings, is there any way to coax the dir command to
always return the full path to the file, whether recursive or not?
The dir command has been around since the dawn of time, why does it
still suck? All the brilliant minds in Redmond, and they can't match
the Unix ls and find commands???
Windows", but that would likely ruffle a few feathers...
I have the following seemingly simple requirements:
1) Directory list of *.foo files, recursive to a particular root
directory
2) Directory list of *.foo files, in the root directory only
The list has to be returned as a full path to the files.
What works (returns full path)
1) dir "C:\Path\To\My\Files\*.foo" /b /s
What fails (returns filename only)
2) dir "C:\Path\To\My\Files\*.foo" /b
I've also investigated the FOR command, it has similar (but different)
shortcomings.
Short of copying a port of the Unix ls command to every user's machine
(not an option), or piping the output from dir into findstr to
overcome its shortcomings, is there any way to coax the dir command to
always return the full path to the file, whether recursive or not?
The dir command has been around since the dawn of time, why does it
still suck? All the brilliant minds in Redmond, and they can't match
the Unix ls and find commands???