Synchronising the folders

Advertisement

upatil
Guest

Synchronising the folders

I am new to WinScp, it is installed on my PC C:\Program Files (x86)\WinSCP
I need to Synchronize folder say C:\OpenLABProjects daily on XYZ server. As my server is being backed-up, data will be moved from my PC to server and then finally in Tape.

I need a batch file, which will daily at scheduled time using windows scheduler. Any changes (like files or folders) from source folder C:\OpenLABProjects should move to destination folder@XYZ server.

I have installed WinSCP 5.9.4 (build 7333), please help. Appreciate your support

Reply with quote

Advertisement

upatil
Guest

Synchronising the folders

My command file
C:\OpenLAB_FileTransfer\Scripts\WinSCP\winscp.com /script=C:\OpenLAB_FileTransfer\Wipro\Automation\ftpscript.txt

ftpscript.txt
option batch continue
option confirm off
open geelopenlab@bp1xeuap3064
lcd C:\OpenLABProject
synchronize remote "C:\OpenLABProject" "\OpenLABProject\"
exit

Output is showing below

C:\>C:\OpenLAB_FileTransfer\Scripts\WinSCP\winscp.com /script=C:\OpenLAB_FileTra
nsfer\Wipro\Automation\ftpscript.txt
batch continue
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "geelopenlab".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] geelopenlab@BP1XEUAP3064
C:\OpenLABProject
Comparing...
Local 'C:\OpenLABProject' => Remote '\OpenLABProject\'
Synchronizing...

But I don't see folders and subfolders are synchronized

Reply with quote

Guest

Re: Synchronising the folders

upatil wrote:

My command file
C:\OpenLAB_FileTransfer\Scripts\WinSCP\winscp.com /script=C:\OpenLAB_FileTransfer\Wipro\Automation\ftpscript.txt

ftpscript.txt
option batch continue
option confirm off
open geelopenlab@bp1xeuap3064
lcd C:\OpenLABProject
synchronize remote "C:\OpenLABProject" "\OpenLABProject\"

Comparing...
Local 'C:\OpenLABProject' => Remote '\OpenLABProject\'
Synchronizing...

>> what is the output followed? Synchronize will compare timestamp or size before performing transition. Could that be a cause to do nothing?
>> And it could be more helpful if you enable log and put log here.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,453
Location:
Prague, Czechia

Re: Synchronising the folders

The first problem is probably that you remote path syntax is wrong. You should use forward slashes, like /OpenLABProject. Basically, make sure you use the same syntax, you see in WinSCP GUI, if you navigate to the target folder.

If that does not help, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

You can post new topics in this forum