Code: Select all
@echo
cd \
D:
cd "D:\Misc\Downloads"
For /f "tokens=1-4 delims=/ " %%d in ("%date%") DO REN "flyer.pdf" "Store weekly ad %%g%%e%%f.pdf"
%windir%\explorer.exe /n,/e,"D:\Misc\Downloads\"
:END
"Store weekly ad 20230604.pdf".
The date used for the filename would always be on that very same day that I downloaded it. I am not a DOS expert by any means. I did some googling and found a script very similar to what I needed so this process could be automated. It was working just fine until about 4 or 5 weeks ago. (See the script above).
For whatever unknown godly reason, they have changed things around on their website. The download link for the PDF is not posted right away. Now I have to wait a couple of days for the link to appear. Usually appears by Tuesday morning. Is there a way to subtract 2 days from the batch script above?
Just to clarify:
They release a new sales ad every Sunday. If I continue to use the dos batch file above, I am forced to manually adjust the filename so it reflects the new release date of Sundays 2 days prior to the actual download. Hope I am explaining this clearly.