Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I've got a batch file that I use in Windows, when I right click on a Drive or Folder the option to use it is there, it runs:
dir/s %1 >c:\windows\desktop\dirlist.txtAs you can see it lists the directory and save it as a text file onto desktop.
My question is this:>Is there a way to give it a better file name?
set var1=??the dirve id or the folder name???
dir/s %1 >c:\windows\desktop\dir_%var1%.txt
Any help would be greatfull,
Topz

dir/s "%1" >c:\windows\desktop\"dir-%1.out"
That should work, I just like the extention .OUT because I tend to do a lot of command /? > command.out and I want them to show up as a different icon in Explorer than a standard text file. I use the quotes because dos does not like to deal with long file names, and the quotes tend to help with this.

![]() |
DOS drivers for firewire
|
Mystical DOS commands
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |