Forum Moderators: open
The problem I am having is that it will download all the files but will not maintain the folders, instead it calls them uknown file and just makes them a file with no extension.
Here is what I have so far.
this is the ftp.bat file
C:\WINDOWS\system32\ftp.exe -i -s:ftp.txt
lcd C:\ftp\backup
"C:\Program Files\7-Zip\7z.exe" a -tzip %date:~10%-%date:~4,2%-%date:~7,2%_somewebsite.com.zip @listfile.txt
del C:\ftp\backup /Q
Here is the contents of ftp.txt
open ftp.somewebsite.com
username123
password456
ls
lcd C:\ftp\backup
mget public_html*
quit
here is the contents of listfile.txt
C:\ftp\backup\*
I stopped using this method years ago because it is very unsafe to use FTP like this. If it was inside a secured network that might be a different story. You should be using SFTP or another form of secure connection. ftp.exe does not allow for this.
Many of the better FTP tools will allow you to schedule a secure transfer and maintain the folder structure at the same time. Some will also compress the files for you.
do you know of any specific examples or what keywords I could use in my searching?
Many of the FTP clients [webmasterworld.com] in the referenced thread have these capabilities.
how would i emplement the glob command