Computing.Net > Forums > Disk Operating System > any batch help?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

any batch help?

Reply to Message Icon

Name: Topz
Date: February 13, 2001 at 12:42:49 Pacific
Comment:

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.txt

As 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



Sponsored Link
Ads by Google

Response Number 1
Name: Laurence
Date: February 14, 2001 at 12:57:28 Pacific
Reply:

Nothing wrong with the name. Can you ve more specific as to exactly what you want?

Batfiles: The DOS batch file programming handbook


0

Response Number 2
Name: DrScriptt (Grant)
Date: February 14, 2001 at 20:37:31 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


DOS drivers for firewire Mystical DOS commands



Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: any batch help?

batch script to install SP3 HELP! www.computing.net/answers/dos/batch-script-to-install-sp3-help/13053.html

Batch Help www.computing.net/answers/dos/batch-help/364.html

'smart' FTP batch help www.computing.net/answers/dos/smart-ftp-batch-help/11611.html