i have a problem with a batch. It scans folders for new pdf files, print, move and delete them. It worked fine until it suddenly stopped without an error. If i type it manually into the cmd it calls "file path does not exist", but it's the correct path. I don't have any clue, maybe some can help or have the same issue.
Thank you in advance for your help.
@echo off
:pdfprint
echo Checkin Druck - bitte offen lassen
IF EXIST *.pdf for %%p in ("C:\Users\Public\Documents\Lexware\bueroeasy\Daten\eRechnung\signed\*.pdf") do ( start /b "Print" "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /n /t "%%p"
ping 127.0.0.1 -n 10
%windir%\system32\taskkill.exe /F /IM AcroRd32.exe
ping 127.0.0.1 -n 5
xcopy "C:\Users\Public\Documents\Lexware\bueroeasy\Daten\eRechnung\signed\*.pdf" "C:\Users\Textilpflege\Desktop\backup\"
ping 127.0.0.1 -n 2
move "%%p" "C:\Users\Textilpflege\Documents\Belegtransfer\9860-11206\Rechnungsausgang\"
IF EXIST *.pdf for %%p in ("C:\Users\Public\Documents\Lexware\bueroeasy\Daten\eRechnung\signed\*.pdf") do DEL *.pdf
)
IF EXIST *.pdf for %%p in ("C:\Users\Public\Documents\Lexware\bueroeasy\Daten\Poststelle\*.pdf") do ( start /b "Print" "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /n /t "%%p"
ping 127.0.0.1 -n 10
%windir%\system32\taskkill.exe /F /IM AcroRd32.exe
ping 127.0.0.1 -n 5
xcopy "C:\Users\Public\Documents\Lexware\bueroeasy\Daten\Poststelle\*.pdf" "C:\Users\Textilpflege\Desktop\backup\"
ping 127.0.0.1 -n 2
move "%%p" "C:\Users\Textilpflege\Documents\Belegtransfer\9860-11206\Rechnungsausgang\"
IF EXIST *.pdf for %%p in ("C:\Users\Public\Documents\Lexware\bueroeasy\Daten\Poststelle\*.pdf") do DEL *.pdf
)
goto :pdfprint
Aucun commentaire:
Enregistrer un commentaire