|Hi everyone !|
It's my first time on this forum, so I hope you will excuse me if I don't do things as they should be done....
I need to do a batch file that allow me to do this:
In a first directory (directory_1), I have some subdirectories and different doc files inside (but with some others files).
In a second directory (directory_2), I have some subdirectories and different pdf files.
Special doc files (in directory_1), called ERG_xxxx.doc, are generated by a software and must be converted (manually for the moment) in pdf files and saved in a directory (inside directory_2).
A friend, not available for the moment, write this code that allow me to find all the DOC file present in directory_1 and not already converted in directory_2.
1) I want to convert only doc file when the name contain "ERG". Can we use two search string with FIND ?
2) When the batch find the not allready converted doc file, it give me only the name (and extension) of the file. Not the complete path with name and extension that is necessary to convert the file with pdfcreator.exe....
Can somebody help me please ?
A soooo Newbie,
for /f "tokens=*" %%§ in ('dir %DIRECTORY_1% /b /s ^| find /i ".doc"') do call :VERIF "%%~nx§"
dir %DIRECTORY_2% /b /s | find "%~n1" >nul
if not %errorlevel%==0 pdfcreator.exe /NoStart /PF"%~nx1"