A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

OT Batch file



 
 
Thread Tools Display Modes
  #1  
Old January 4th 18, 03:51 PM posted to microsoft.public.windowsxp.general
Seymore4Head[_2_]
external usenet poster
 
Posts: 25
Default 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?
Ads
  #2  
Old January 4th 18, 06:24 PM posted to microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default 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


  #3  
Old January 4th 18, 07:35 PM posted to microsoft.public.windowsxp.general
Seymore4Head[_2_]
external usenet poster
 
Posts: 25
Default 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
  #4  
Old January 4th 18, 07:52 PM posted to microsoft.public.windowsxp.general
Seymore4Head[_2_]
external usenet poster
 
Posts: 25
Default 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
  #5  
Old January 4th 18, 08:29 PM posted to microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default 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


  #6  
Old January 6th 18, 12:51 AM posted to microsoft.public.windowsxp.general
Seymore4Head[_2_]
external usenet poster
 
Posts: 25
Default 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.
  #7  
Old January 6th 18, 10:07 AM posted to microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default 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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 01:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.