0

I want to know how I could add a condition in a batch file to not overwrite always all files every time I transfer the files from one FTP server to another. Here is my code:

open rs68.lyon.fr.sopra
dbaq60
sopra*
cd "path file to transfer"
prompt
bin
mget *
disconnect
quit

So all I want to do is to test:

  • If a file exists already in target directory, then don't copy it .
  • If file does not exist in target directory, then copy it.
mmmmmm
  • 30,723
  • 26
  • 85
  • 109
  • possible duplicate of [How to check if a file exists from inside a batch file](http://stackoverflow.com/questions/4340350/how-to-check-if-a-file-exists-from-inside-a-batch-file) – DarkDust Jun 30 '14 at 07:03
  • Very intresting but how can i test in a multiple files, i don't want to put the name of my file but : 1- look over my record 2- see if my files that i want to copy exist one by one 3- copy if there is no file, copy else not copy – user2466161 Jun 30 '14 at 07:12
  • Just [iterate over the files](http://stackoverflow.com/questions/138497/iterate-all-files-in-a-directory-using-a-for-loop). – DarkDust Jun 30 '14 at 07:21

0 Answers0