WORKINGDIR "c:\download\destination\folder" ;; The next two lines will: ;; 1) Get today's date string in mm-dd-yy format ;; 2) Subtract 1 day to get yesterday's date SET yesterday = %date DATESUB yesterday 1 ;; Parse date as string with "-" character as delimiter ;; then rearrange the values to change the name pattern SETEXTRACT month = yesterday "-" 1 SETEXTRACT day = yesterday "-" 2 SETEXTRACT year = yesterday "-" 3 SET MyWildcard = "*20" + year + "-" + month + "-" + day + "*" ;; Download all files that match name wildcard pattern FTPLOGON "ftp.mydomain.com" /user="UserID" /pw="Secret" RCVFILE MyWildcard