I have a large number of sql backup files on my server that are automatically created each night. I want to make a button that will connect to the site and download those files. This is the code I am trying but the copy tries to start before the ftp connection is completed. Can someone please provide some pointers on what I am doing wrong?sync:dopusrt /cmd ftp://<user>:<pass>@<domain>/backups/mysql/
sync:dopusrt /cmd copy db.sql to E:\mysql\backups\
Try:
sync:dopusrt /cmd copy "ftp://<user>:<pass>@<domain>/backups/mysql/db.sql" to E:\mysql\backups
I've not tested this but it should get you on the right track at least.
It's unlikely to make much difference but, for simplicity, you might as well remove the sync:dopusrt /cmd stuff as well.
copy "ftp://<user>:<pass>@<domain>/backups/mysql/db.sql" to E:\mysql\backups
I've used that kind of command in the past to copy files the other way (local to FTP) but haven't tried it for downloading files.
I gave that a try but it failed saying the directory or file could not be created. The destination is a valid path (I even tried c:). Any ideas on why this is failing?
Show us exactly what you have in the command.
Here it is, with the obvious changes:
copy "ftp://user:pass@domainanme:21/backups/username/mysql/db.sql" to c:\
Try this:
copy "ftp://user:pass@domainname//backups/username/mysql/db.sql" to c:\
(I removed the ":21" and added the extra "/" after the domain name)
Thank you. That fixed it.