Hi guys,
so i'm trying to create a script based on the currentday script in the script library. Wich will download yesterdays and currentdays file.
Here what I did:
Let me know what you think. Thanks everyone
so i'm trying to create a script based on the currentday script in the script library. Wich will download yesterdays and currentdays file.
Here what I did:
FTP Script
- # Connect to the FTP server
- # Set current local directory
- # Set current remote directory
- # Get remote file listing
- # Get the current date
- # The time is expressed in this format:
- # AAAA_MM_DD-HH_MM_SS
- # We need only the AAAA_MM_DD part.
- #Get yesterday date
- # Then, you can substract or add seconds to that date stored
- # in the variable. Yesterday is:
- $yesterday=$currenttime-(86400)
- # For each file in the list do the following
- # Check if the file has been created today
- # The file has been created or modified yesterday. Download it.
- # The file has been created or modified today. Download it.
http://www.scriptftp.com/forum/general-f6/way-to-check-number-of-days-in-a-month--t9027.html#p14942