Hi all,
I used BC2 for Windows to daily synch two data drives by way of a batch. Now I've migrated under Linux (14.10 Utopic Unicorn) and I can't get my batch to create the log file as it did previously.
Here is what I did :
My initial batch under Windows was the following :
C:\Batches\Synch-BC\BC2-NAS-008.bat
C:\Batches\Synch-BC\BC2-NAS-007.bc2
I first copied my batch folder from my old Windows folder (C:\Batches) into a ~/bin folder. So now I got a ~/bin/Synch-BC folder containing everything.
Then I translated the .bat into a .sh and changed the log file and session in the .bc2, of course after recreating an equivalent session :
~/bin/Synch-BC\BC2-NAS-008.sh
~/bin/Synch-BC\BC2-NAS-007.bc2
However, when I run the .sh from a shell, it loads BC4, then pops up a message :
The French part of the message "Aucun fichier ou dossier de ce type" means "No file or folder of that type".
I have no idea of this error's cause. I tried to touch the file with the full path copied from the error message, and the file was successfully created. I tried to run the script with the file already existing. I even tried to sudo the script, to no avail.
Thanks for any help and a good 2015 Year to all BC users !
I used BC2 for Windows to daily synch two data drives by way of a batch. Now I've migrated under Linux (14.10 Utopic Unicorn) and I can't get my batch to create the log file as it did previously.
Here is what I did :
My initial batch under Windows was the following :
C:\Batches\Synch-BC\BC2-NAS-008.bat
Code:
"c:\Program Files (x86)\BeyondCompare2\BC2.exe" %@ C:\Batches\Synch-BC\BC2-NAS-007.bc2
Code:
# Set logging log C:\Batches\Synch-BC\Logs\BC2-NAS-%date%-%fn_time%.log log verbose # Display no prompt option confirm:yes-to-all # Load comparison load "Disque Dur RĂ©seau" # Synchronize the right folder to the left sync create-empty mirror:lt->rt # Make sure the timestamps are correctly in sync expand all select right.newer right.older touch lt->rt
Then I translated the .bat into a .sh and changed the log file and session in the .bc2, of course after recreating an equivalent session :
~/bin/Synch-BC\BC2-NAS-008.sh
Code:
#!/bin/bash /usr/bin/bcompare "@~/bin/Synch-BC/BC2-NAS-007.bc2"
Code:
# Set logging log ~/bin/Synch-BC/Logs/BC2-NAS-%date%-%fn_time%.log log verbose # Display no prompt option confirm:yes-to-all # Load comparison load "/Reseau/DisqueComplet" # Synchronize the right folder to the left sync create-empty mirror:lt->rt # Make sure the timestamps are correctly in sync expand all select right.newer right.older touch lt->rt
Code:
03/01/2015 12:10:19 Fatal Scripting Error: Cannot create file "/home/leschouchous/bin/Synch-BC/Logs/BC2-NAS-2015-01-03-12-10-19.log". Aucun fichier ou dossier de ce type
I have no idea of this error's cause. I tried to touch the file with the full path copied from the error message, and the file was successfully created. I tried to run the script with the file already existing. I even tried to sudo the script, to no avail.
Thanks for any help and a good 2015 Year to all BC users !
Comment