jfgonzalez
Technical User
I'm wondering if existing batch files can be updated if a secondary batch file is updated.
Here's what I have. I have a batch file called 'Cpy_Bill.bat' that my boss wrote. This is what it contains:
cpy_bill 04470832
cpy_bill 91001900
and so forth, down to about 60 lines. The number represents a 'ship to' number so that whenever a new 'ship to' number is added to the AS400 for this vendor, it automatically updates this batch file and adds a new line with this code at the bottom.
I have a second batch file that I use to look for pdf files that are created by our system every evening, copy specific ones by file name (usually based on this 'ship to' number) and then moves them to a specific folder. For this particular customer it goes something like this:
copy e:\systems\pdfoutputall\inv_????_????????_04470832.pdf e:\systems\pdfoutput\production\vendor
copy e:\systems\pdfoutputall\inv_????_????????_91001900.pdf e:\systems\pdfoutput\production\customer
and so on.
Later on in the processing, the pdf files are zipped up and e-mailed to the customer.
This latter batch file is one I've had in place for months, but with this new customer there is no telling when they will add new ship to numbers and I'm at a loss as to how to update my main batch program automatically when the cpy_bill.bat file is updated. Right now I'm updating it manually but I know I can't do that forever. I'd appreciate some advice on how I might approach this.
Thanks,
JFG
Here's what I have. I have a batch file called 'Cpy_Bill.bat' that my boss wrote. This is what it contains:
cpy_bill 04470832
cpy_bill 91001900
and so forth, down to about 60 lines. The number represents a 'ship to' number so that whenever a new 'ship to' number is added to the AS400 for this vendor, it automatically updates this batch file and adds a new line with this code at the bottom.
I have a second batch file that I use to look for pdf files that are created by our system every evening, copy specific ones by file name (usually based on this 'ship to' number) and then moves them to a specific folder. For this particular customer it goes something like this:
copy e:\systems\pdfoutputall\inv_????_????????_04470832.pdf e:\systems\pdfoutput\production\vendor
copy e:\systems\pdfoutputall\inv_????_????????_91001900.pdf e:\systems\pdfoutput\production\customer
and so on.
Later on in the processing, the pdf files are zipped up and e-mailed to the customer.
This latter batch file is one I've had in place for months, but with this new customer there is no telling when they will add new ship to numbers and I'm at a loss as to how to update my main batch program automatically when the cpy_bill.bat file is updated. Right now I'm updating it manually but I know I can't do that forever. I'd appreciate some advice on how I might approach this.
Thanks,
JFG