keep local directory up to date batch file

Advertisement

ryanbodhipaksha
Joined:
Posts:
2

keep local directory up to date batch file

Hi,

I have a working .bat file that, when executed from my PC, automatically keeps a directory on my remote PLC directory up to date when changes are made to a directory on my PC. I would like to change the script to flip the sync direction to give me the opposite result: when a change is made on the PLC directory it needs to keep the PC directory up to date.

This is my current line of code that runs syncing from PC>PLC which works for that:
"keepuptodate "C:/test/PLC_RX/" /opt/plcnext/test/" ^
What syntax would give me the syncing from PLC>PC instead? I am very new to all of this scripting language so elaborate explanations are welcome.

Thanks!

Reply with quote

Advertisement

ryanbodhipaksha
Joined:
Posts:
2

I actually managed to figure out a solution to my problem on my own within a few hours...

I replaced the existing syntax with the following code:
"synchronize local "C:/test/PLC_RX/" /opt/plcnext/test/" ^
Since the code above runs only once, unlike keepuptodate, I just placed the whole process in a loop using the goto command for .bat files; I placed :a at the beginning and goto a just before the exit of the code.

Reply with quote

Advertisement

You can post new topics in this forum