I am trying to run a script to FTP a file from our as/400 to a local PC based on a dynamic filename. The script works as is for a static filename but the actual filenames are based on this pattern:
A+[date]+[batch number] (IE: A033109001, A033109002…)
[date]=MMDDYY
::Batch File
FTP -S:LOGIN.SCR FTP.SERVER.COM
::Login.Scr
USER
PASSWORD
CD ACOM
BINARY
GET A032609001 C:\ACOM\A032609001
BYE
Can I wildcard the filename somehow using the rename date formatting?
IE: a%date:~4,2%%date:~7,2%%date:~12,2%???.*
OR: a%date:~4,2%%date:~7,2%%date:~12,2%*.*
Other suggestions on how to do this?