1.

Solve : copy from drive with password?

Answer»

Hi everyone - I'm new to batch files and need some help copying files from a folder that has a password associated with it.

I am trying to copy all files from an ftp://FTP://SFTP.URL.COM to a \\dir\project\folder

I have tried cd to the ftp site but that doesn't work.  Any ideas?  Can I pass a user name and password with it?  will xcopy work once I get in?

Any help is appreciated!In addition to your batch file, it might be easier to setup a FTP script. FTP is a shell program with it's own INSTRUCTION set.

Quote

Can I pass a user name and password with it?  will xcopy work once I get in?

Name and password, Yes. XCOPY, No.

This link may help you out.

Good luck. Wow!  That is very helpful!  So now I have a script that launches the FTP script to get all the files in the directory and then DELETES everything.  But...what if a user posts a new file while I am getting the others?  Is there a way to delete the FTP files only if they have a TIMESTAMP before I started the get? Quote
But...what if a user posts a new file while I am getting the others?  Is there a way to delete the FTP files only if they have a timestamp before I started the get?

You might need a smarter FTP client than the one Windows provides.

Do all the files have the same extension? If so you may be able to change the extension of all the AVAILABLE files, use MGET *.ext to download all the files with the new extention, then use mdelete *.ext to delete the files. Any file not named with the new extension would not get processed until the next cycle.

You might also get a dir list from the remote computer, then download and delete each file by name.

Good luck.


Discussion

No Comment Found