OT Batch file
dir O:\ /s/b/o "o:\dl\misc\List\drive.txt"
What I am shooting for is to show files that are also in sub folders, but I don't want the path displayed. How do I modify this to not show the path? |
OT Batch file
Seymore,
How do I modify this to not show the path? You could try to remove the '/b', but I don't think you will like the result .... (too much crap besides the filenames). In short, you don't. But its possible without even using 'dir'. Like this: @echo off echo.$$$.txt for /r o:\ %%a in (*) do echo %%~nxa $$$.txt sort $$$.txt o:\dl\misc\List\drive.txt del $$$.txt Hope that helps. Regards, Rudy Wieser |
OT Batch file
On Thu, 4 Jan 2018 18:24:03 +0100, "R.Wieser"
wrote: Seymore, How do I modify this to not show the path? You could try to remove the '/b', but I don't think you will like the result ... (too much crap besides the filenames). In short, you don't. But its possible without even using 'dir'. Like this: @echo off echo.$$$.txt for /r o:\ %%a in (*) do echo %%~nxa $$$.txt sort $$$.txt o:\dl\misc\List\drive.txt del $$$.txt Hope that helps. Regards, Rudy Wieser Can this be modified to use more than one drive? Thanks |
OT Batch file
On Thu, 04 Jan 2018 13:35:57 -0500, Seymore4Head
wrote: On Thu, 4 Jan 2018 18:24:03 +0100, "R.Wieser" wrote: Seymore, How do I modify this to not show the path? You could try to remove the '/b', but I don't think you will like the result ... (too much crap besides the filenames). In short, you don't. But its possible without even using 'dir'. Like this: @echo off echo.$$$.txt for /r o:\ %%a in (*) do echo %%~nxa $$$.txt sort $$$.txt o:\dl\misc\List\drive.txt del $$$.txt Hope that helps. Regards, Rudy Wieser Can this be modified to use more than one drive? Thanks It can. I figured it out. Thanks again |
OT Batch file
Seymore,
It can. I figured it out. :-) Good to hear you did it yourself. How did you do it though ? Duplicating the "for" line for each drive (which is probably the simpelest way to do it) ? Regards, Rudy Wieser |
OT Batch file
On Thu, 4 Jan 2018 20:29:59 +0100, "R.Wieser"
wrote: Seymore, It can. I figured it out. :-) Good to hear you did it yourself. How did you do it though ? Duplicating the "for" line for each drive (which is probably the simpelest way to do it) ? Regards, Rudy Wieser Yep Thanks again. I wish I had been keeping a backup of my list like this years ago. |
OT Batch file
Seymore,
Thanks again. You're welcome. I wish I had been keeping a backup of my list like this years ago. I'm guessing he to be able to find a long filename back for a mangled 8.3 name in a folder (after having used a DOS copy or program) ? :-) Regards, Rudy Wieser |
All times are GMT +1. The time now is 09:50 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2006 PCbanter
Comments are property of their posters