I am downloading mulitple files but I don't know their names nor their file extension. Can someone tell me how to download all files with extension and append date and time to local folder after download.
Thanks in advance
Cheers
Thanks in advance
Cheers
Hi Luke,
Try something like this:
Try something like this:
FTP Script
- # Get the current date-time
- # Create a local directory with the current date-time as name
- # Change current local directory to the created dir
- # Change current remote directory
- # Download every file from the FTP server
liked Script FTP? Try our other product Email Parser
Team,
What I am trying to do is to download *.* files and rename those files with appending time and date using GETLIST cmd. Below is the script and the error message when running.
Thanks in Advance.
Cheers
What I am trying to do is to download *.* files and rename those files with appending time and date using GETLIST cmd. Below is the script and the error message when running.
Thanks in Advance.
Cheers
FTP Script
Running C:\Users\skywalker\Desktop\test.ftp
EXEC("copy "c:\test\download\*.*" c:\test\backup")
c:\test\download\first.txt
c:\test\download\fourth.txt
c:\test\download\second.txt
c:\test\download\third.txt
4 file(s) copied.
LOCALCHDIR("C:\test\backup")
Changing current local directory to C:\test\backup
GETLIST(LOCAL_FILES)
Getting file listing of current local directory
Found 4 files.
GETTIME(FORMAT3)
Retrieving current time.
RENAMEFILE("$item","$item-20100201")
***** RENAMEFILE Error #18001: Not connected.
This line contains an error:
The correct way is:
FTP Script
FTP Script
liked Script FTP? Try our other product Email Parser
I am getting exactly the same error and I have no errors in my code.
RENAMEFILE("130124194207.psc","av_altavista-130124194207.psc")The script still continues on and executes all other actions except for the renaming of the files.
***** RENAMEFILE Error #18001: Not connected.
FTP Script
- #set the local directory
- #retreive the local list of bak files
- # If GETLIST did not find any files
- GOTO :cleanup
- #rename each file with the name of the db
Hello Craig,
Please, use VERBOSE(ON) on the top of your script file and post here what you get just after using RENAMEFILE. This will give me some clues about what is going on
Please, use VERBOSE(ON) on the top of your script file and post here what you get just after using RENAMEFILE. This will give me some clues about what is going on
liked Script FTP? Try our other product Email Parser
- All times are UTC -