|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Registered User
Join Date: Jun 2000
Location: USA
Posts: 118
|
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 |
|
|
|
|
|
#2 |
|
Ride 'em Cowboy
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) |
|
|
|
|
|
#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..... |
|
|
|
|
|
#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.
|
|
|
|
|
|
#5 |
|
Member (10 bit)
|
@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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|