Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

Just leaving this around, but I'd never use it. `PRINT.EXE` sucks... Can't even print PDF's generated from "Microsoft Print to PDF".... Use AcroRd32.EXE or another 3rd party PDF printer. I'm working on a jumbo print all script for pdf/docx/xlsx/pptx as well.

Print_Files.cmd:

@echo off
::listfiles "C:\tmp\New folder" *.pdf
set PRINTCMD=print
set SERVER=MyServer

set SHARE=MyPrinter

setlocal enableextensions enabledelayedexpansion
call :find-files %1 %2
::echo PATHS: %PATHS%
::echo NAMES: %NAMES%
%PRINTCMD% /D:"\\%SERVER%\%SHARE%" %PATHS%
goto :eof

:find-files
    set PATHS=
    set NAMES=
    for /r "%~1" %%P in ("%~2") do (
        set PATHS=!PATHS! "%%~fP"
        set NAMES=!NAMES! "%%~nP%%~xP"
    )
goto :eof

Print_Dir.cmd:

@echo off
pushd %~dp0
cls
::FreeSoftwareServers.com

call "%~dp0\Print_Files.cmd" "%~dp0\" *.pdf
  • No labels