How i can use WINSCP and Powershell to this work:
Folder 1 has many folders (they names 10102014, 11102014, 12102014, 13102014 .....)
I need this folder to destination folder (folder 2)
But i need condition IF someone folder exist she do not copy to destination folder and if folder dos not exist she (folder) copy to destination ((
NEW NEW NEW!!!!
I have many directories MY REAL EXEMPLE:
In folder CHINA (Every day automate created folders 09102014; 10102014; 11102014; 12102014; 13102014 folder name = date)
I need copy (SFTP) this folder and include files to folder RUSSIA (09102014; 10102014; 11102014; 12102014; 13102014 folder name = date)
THIS FOLDER (09102014; 10102014; 11102014; 12102014; 13102014) has some .txt files.
Somebody files in destination folder I deleted (it is need for work)
If i run my script again. Files when i delete in sorce folder appear again. I do not need this.
It is real doing?
Thank you very much!
Please help me.
My problem is: I need use Powershell and winscp, and copy directory and files in this directory. Ok. I can do it.
But if i copy 1 time to destination folder, all files updating. It is not good.
Server1\home\user\ (in this folder has many folders (folders name 08102014;09102014;10102014)
How i can check exist folder on destination server or not exist? If exist do not getfile(copy) if not exist then run getfiles.
but what need next?) I dont now. Sorry i have bad English.