Hi,
I'm new to writing batch files and looking for some help with the following:
I have a directory with 10 notepad text files and would like to:
1) Open File
2) Print File
3) Close File
4) Repeat 1 thru 3 until all 10 text files in directory are printed.
Thank you,
Chubs
Open-Print-Close Notepad Text files within a directory
Moderator: DosItHelp
Re: Open-Print-Close Notepad Text files within a directory
Thanks.
I guess I don't understand how Notepad /P will print all 10 files.
Do I execute the cmd in the directory?
I guess I don't understand how Notepad /P will print all 10 files.
Do I execute the cmd in the directory?
Re: Open-Print-Close Notepad Text files within a directory
Well the long hand way.
Etc......
Code: Select all
notepad /p file1.txt
Notepad /p file2.txt
Notepad /p file3.txt
Etc......
Re: Open-Print-Close Notepad Text files within a directory
The more dynamic way.
Code: Select all
for %%G in (*.txt) do notepad /p "%%G"
Re: Open-Print-Close Notepad Text files within a directory
Thanks Squashman.
All responses extremely helpful.
This solved my query.
Regards,
Chubs
All responses extremely helpful.
This solved my query.
Regards,
Chubs