Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 07-11-2003, 01:04 PM   #1
Registered User
 
Join Date: Jun 2000
Location: USA
Posts: 118
Question Need help modifying a batch file :-)

hi,
i have no idea how these batch files are made...but i do have one that i like what it does (i got it out of pcworld mag) but i need to modify it. Its a print dir batch file...id like it NOT to print and rather just make a .txt file or .doc heres the file in notepad:
@dir %1 /-p /o:gn > "%temp%\dir.txt"
@notepad /p "%temp%\dir.txt"
can anyone tell me how i can change that to make it just save directories in notepad or even better wordpad or word?
then i can just paste it back in and hopefully it will work. Thanks in adv!
Nelly
aka_nelly is offline   Reply With Quote
Old 07-11-2003, 01:57 PM   #2
Ride 'em Cowboy
 
EzyStvy's Avatar
 
Join Date: Dec 1999
Location: Dallas, Tx
Posts: 9,109
@dir %1 /-p /o:gn > "%temp%\dir.txt" (this one creates a file called dir.txt)

@notepad /p "%temp%\dir.txt"(this one tell it to print)
EzyStvy is offline   Reply With Quote
Old 07-11-2003, 02:44 PM   #3
Registered User
 
Join Date: Jun 2000
Location: USA
Posts: 118
Thanks ezy,
i tried it....just erasing the second line...and i put the batch in the directory i wanted to copy and it seemed to run...but now i don't know where the file is. :-( sorry, im a real nooby.....
aka_nelly is offline   Reply With Quote
Old 07-11-2003, 02:50 PM   #4
Member (8 bit)
 
Join Date: Nov 2001
Posts: 143
"%temp%\dir.txt" tells it to create a file dir.txt in the windows default temp directory.
LittleGhoti is offline   Reply With Quote
Old 07-12-2003, 10:38 AM   #5
Member (10 bit)
 
Join Date: Jul 2002
Location: Trivandrum, India
Posts: 800
Send a message via Yahoo to pillainp
@dir %1 /-p /o:gn > "%temp%\dir.txt"
@notepad /p "%temp%\dir.txt"
Replace %temp% with the path name of your choice in the batch file itself. Alternatively, remove the switch /p from the @notepad line so that it does not print the output, but saves the file in the default Windows temp directory.
pillainp is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:46 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2