I'm trying to upload latest files generated in one hour to a remote server. But the script I wrote is intelligent enough to gather only the latest file in directory and upload it to FTP. Any chance of set the variable type as array and upload the files in the array?
My FTP batch file:
FOR /F %%I IN ('DIR "abcdef*.bac" /B /O:D') DO SET latest_file=%%I
echo user domain/username> ftp.txt
echo password>> ftp.txt
echo cd remotepath>> ftp.txt
echo put %latest_file%>>ftp.txt
echo quit>> ftp.txt
ftp -n -s ftp.txt Servername>ftp_logs.txt
del ftp.txt