2

I've got no idea where to start with this :-/

I have a folder with around 500 files in it, that I would like to print off in order of date modified. I could go through and do them one by one, but why do that when I'm sure there will be a way using batch!

Please help...

TonyT
  • 23
  • 1
  • 1
  • 3

3 Answers3

3

You should take a look at PrintAny.bat, which should handle the task of printing one file from batch.

For the task of doing it in modification date order, dir command will supply the list in the desired order. Then for command will handle this list, calling PrintAny to do the printing part.

for /f "tokens=*" %%f in ('dir /od /tw /b /a-d "c:\DocDir\*.*"') do (
    call printAny.bat "%%~ff"
)
foxidrive
  • 40,353
  • 10
  • 53
  • 68
MC ND
  • 69,615
  • 8
  • 84
  • 126
0

If you have Windows 7 you can right click on the files and select to Print.

As far as I know you can select all files of a specific type (Word, PDF, etc) and print them this way. It does not allow you to print all of the files selected if they have different types, so you must choose each type at a time. (eg. search for .PDF on the folder, select all files, right click them and choose the Print option)

Joao Jesus
  • 186
  • 2
  • 11
  • this has the downside that you can choose a maximum of 15 files (default value that is changeable in regedit) and you don't get the print in order, as was wished. – Uke Dec 01 '17 at 08:29
0
dir *.txt /b /s >> C:\temp\test.txt

try this

Ashwith Ullal
  • 263
  • 3
  • 10