Search found 2 matches
- 29 Dec 2014 15:40
- Forum: DOS Batch Forum
- Topic: Show file names without paths
- Replies: 4
- Views: 2627
Re: Show file names without paths
Squashman, Thank you! It's all gibberish to me, but it does what I needed at the command line. Should this work in a batch file? @Echo off cd c:\directory1 for /F "delims=" %%G in ('dir /a-d /b /s') do echo %%~nxG > C:\Users/MrBob\Documents\files.txt cd c:\directory2 for /F "delims=&q...
- 29 Dec 2014 14:07
- Forum: DOS Batch Forum
- Topic: Show file names without paths
- Replies: 4
- Views: 2627
Show file names without paths
I need to just list file names in a maze of subdirectories. so I tried using:
dir /b/s
with /b for bare file name and /s for subdirectories
but even with /b, this gives the file name plus path. How can I get just the file names?
Thank you for your help.
Mr. Bob
dir /b/s
with /b for bare file name and /s for subdirectories
but even with /b, this gives the file name plus path. How can I get just the file names?
Thank you for your help.
Mr. Bob