|
Answer» Good morning all,
I need help writing a batch file to open multiple files and their accompanying PDFs based on file name input and date input.
Below is what I've started with: ECHO OFF CLS :MENU ECHO. ECHO ....................................... ........ ECHO PRESS 1 for vendor or 2 to EXIT ECHO ....................................... ........ ECHO. ECHO 1 - Open Vendor File ECHO 2 - EXIT ECHO. SET /P M=Type 1 or 2 then press ENTER: IF %M%==1 GOTO OPENFILE IF %M%==2 GOTO EOF :OPENFILE %systemroot%\explorer.exe "XX:\subfolder1\subfolder2\vendornumber\reports\pdf_file" GOTO MENU
Output needs to be based on Vendor number and PDF file by date. Ideally, the flow path would be: 1 - enter vendor number 2 - store vendor number in memory/list 3 - repeat until a closing variable is entered, like "zz" 4 - once "zz" is entered, open all PDF files based on vendor number entered by most current date contained inside the "XX:\subfolder1\subfolder2\vendornumber\reports" path
Any help on this would be greatly appreciated.
Thanks.Curious why you want to use batch to do this. You COULD simply navigate to the folder for vendornumber of which EVER vendor and the select ALL files and tell them to open... and able to do this all from WINDOWS GUI without having to code anything up and its navigation will be easier for and end user.Quote from: caniacbart on May 18, 2016, 06:44:33 AM Output needs to be based on Vendor number and PDF file by date. Ideally, the flow path would be: 1 - enter vendor number 2 - store vendor number in memory/list 3 - repeat until a closing variable is entered, like "zz" 4 - once "zz" is entered, open all PDF files based on vendor number entered by most current date contained inside the "XX:\subfolder1\subfolder2\vendornumber\reports" path
Is the requirement for the user to enter a list of vendor numbers and open the lastest PDF file in each vendor folder?
1) What program is being used to view the PDF files in?
2) What files are being opened? Your subject states "files & PDFs"
|