ftp automation


The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Post a message here if you find anything wrong in ScriptFTP.
When you do this instead of print 2017_01_16 print 2017_1_16-
FTP Script
  1. # Get the current date in the format YYYY_MM_DD-hh_mm_ss
  2. $currentdate=GETDATE(FORMAT0)
  4. # Then, you can substract or add seconds to that date stored
  5. # in the variable. Yesterday is:
  6. $yesterday=$currentdate-(60*60*24)
  7. # (3600*60*60) is the amount in seconds in a day.
  9. # This shold print the yesterday date:
  10. PRINT($yesterday)

It should print the date along with the time(for example 2017_1_17-20_15_54). I have tested the script with the latest version and it correcly shows the time of yesterday substracting 24 hours to the current time. See the screenshot:
yesterday_date_ftp_script.jpg (47.78KiB)Viewed 2114 times
I think he means the month changes from 01 to just 1, without the trailing 0?
Yes, correct. Disregard my last response. This has been fixed in the new 4.3 beta version. It can be downloaded from here. (sorry, no link)