|I think I get the "gist", but not sure about some details:|
3. on the next day, the files are removed but we will leave only one file which is the latest file
4. the script will run again, but I don't want it to upload all files again, it will check what is the latest file and it should only upload new files
in 3 you said all the files are removed (from the working directory, I assume) except the latest one. But then in 4 you imply that those files (having earlier time-stamps) might still be present and need to be filtered. This perceived discrepancy would determine how the batch handles the filtration: skip the first (earliest) file and ftp the rest, or apply the date from the earliest file to filter files for uploading. The first case is easy: skip the first line of a date-sorted directory (the "flag" file). The second case, where other files with earlier dates might mix in, would require more attention, but still not real difficult to do: sort the dir. by date, but start FTP with all files following the "flag" file.
The login auth. has to be handled by FTP, (FTP /S scriptfile) not batch. Put the requisite authentication into the FTP-script file, then the batch can get you hooked up for FTP using the FTP-script.