Synctoy 2.0 log files


S

Steve

Anyone having problems with the log files in version 2.0?
I know it says it's supposed to write it's information to the application
log, but I do not see any enteries in there from synctoy. I'm running this
from the synctoycmd (with the -R option) and I need to see this information
in the app log to see if I got any errors or not.
I'm just not seeing any enteries at all.
 
Ad

Advertisements

S

Swifty

Steve said:
Anyone having problems with the log files in version 2.0?
I know it says it's supposed to write it's information to the application
log, but I do not see any enteries in there from synctoy. I'm running this
from the synctoycmd (with the -R option) and I need to see this information
in the app log to see if I got any errors or not.
Steves of the world unite!

I think that SyncToyCmd.exe is designed to write its log to the console
(STDOUT). If you need it to go to a particular file, you can use
redirection to write it to a log file.

This is what I do - I run SyncToyCmd.exe as a scheduled task, but the
task invokes a script which runs SyncToyCmd and redirects the output to
the log of my choice (in my case C:\Temp\SyncToy.log)
 
S

Steve

Thanks Swifty, that's a pretty good idea. I can do that in a pinch.
I do think it's a real oversite that they didn't add the ability to put the
information into a log file for the synctoycmd utility especially since it is
typically run unattended. I hope they resolve that issue before 2.0 gets out
of Beta!
 
S

Swifty

Steve said:
Thanks Swifty, that's a pretty good idea. I can do that in a pinch.
I do think it's a real oversite that they didn't add the ability to put the
information into a log file for the synctoycmd utility especially since it is
typically run unattended. I hope they resolve that issue before 2.0 gets out
of Beta!
Yes, my sentiments exactly. The only reason I have for running
SyncToyCmd.exe is inside the scheduled task where I do my backups each
night. I don't see the console traffic so I had to write my script to
divert the console output to a log file.

I tried "SyncToyCmd /?" because I was sure there would be a logging
option, but was disappointed.

I even created a little webpage that analyses my most recent backup run
at http://swiftys.org.uk/cgi-bin/synctoy.rex displaying the good news in
green and the bad news in red.
 
S

Steve

Well my reasons are a little different, I'm setting up Sync for my parents
because they don't understand they need backups and if they accidently delete
something they love it if I can get it back for them. Since they are 300
miles away it's not easy for me to check their log files and I really don't
want to put it on a website for the world to see. I perfer to use a utility
such as EventSentry Light(http://www.eventsentry.com) which will analyze the
log files and email me if there is a problem.
 
T

Tony G

On XP I found SyncToyLog.log here:
C:\Documents and Settings\username\Local Settings\
Application Data\Microsoft\SyncToy\2.0

I'm not sure yet if that's updated by the command-line. I've just used the
GUI so far.
 
Ad

Advertisements

M

Mike

What do you know! I downloaded sync toy as an extra layer of protection using
it to sync various drives each night at my office, and I have the same kind
of a question. I know that in the past, when I have tried to direct output
from STDOUT to a log file I would just do something like

dir *.exe > logfile.log

and it would send the text to the log file. I tried dong the same exact
thing to sync toy. I have created a test sync. I then scheduled it in XP
scheduler. Then, I modified the command line adding "> logfile.log" at the
end. It did complete the sync, but no log. I think I just don't see what
kind of syntax I need. I could create a batch file, but not sure what to do.
Can I get a sample batch file to use if you don't mind sharing? Thanks!
 
S

Swifty

Mike said:
and it would send the text to the log file. I tried dong the same exact
thing to sync toy. I have created a test sync. I then scheduled it in XP
scheduler. Then, I modified the command line adding "> logfile.log" at the
end. It did complete the sync, but no log. I think I just don't see what
kind of syntax I need. I could create a batch file, but not sure what to do.
Well, firstly, is your scheduled event using synctoy.exe or synctoycmd.exe?
Synctoy.exe doesn't write to STDOUT, hence no log.

if you wanted a batch file, then start by creating a file something.bat
containing:

C:\progra~1\syncto~1.0be\synctoycmd.exe

You may have to fiddle with the directory names; use dir /x to see the
shortnames.
 
Joined
Mar 11, 2009
Messages
1
Reaction score
0
Save this as .bat file, you will need to download bmail from beyondlogic.org
You will also need to change your ISP smtp server details and email from and to addresses.
The script below will email the synctoy log file, but sends the entire log file so over time I imagine this file could get quite large, would be nice if could get to just send the append data, if anyone knows.

Enjoy

Damo

@echo off
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Run SyncToy Configure Folders in Application :::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Error Check, followed by bmail from beyondlogic.org ::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if errorlevel ( set result=FAILED
) else (
set result=OK
)
echo
bmail -s smtp.mailserver.ie -t (e-mail address removed) -f (e-mail address removed) -h -a "SyncToy Backup Completed Successfully" -m "C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\SyncToy\2.0\SyncToyLog.log"
 
Joined
Jun 4, 2009
Messages
5
Reaction score
0
Swifty said:


if you wanted a batch file, then start by creating a file something.bat
containing:

C:\progra~1\syncto~1.0be\synctoycmd.exe

You may have to fiddle with the directory names; use dir /x to see the
shortnames.
Sheez, aren't you guys getting a little bogged down in the details? :)

1. Synctoy logs everything to a text file, as quoted earlier, in the user profile (C:\Documents and Settings\{username}\Local Settings\
Application Data\Microsoft\SyncToy\2.0). Each run's events are appended to the end of the file, and you can edit it to clean up (who wants to keep records going back to the beginning of time, right?)

2. If you really feel the need to use a batch file, or indeed at any time to use long file / folder names at the command line, just enclose the whole path & executable in double quotes (command line switches come after the close quotes). Using 8.3 names is so last century...

I'm not sure why exactly you would want to use a .BAT though. My scheduled task runs this command:
"C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R
and it works just fine!

Chris
 
Ad

Advertisements

Joined
May 25, 2013
Messages
1
Reaction score
0
Save this as .bat file, you will need to download bmail from beyondlogic.org
You will also need to change your ISP smtp server details and email from and to addresses.
The script below will email the synctoy log file, but sends the entire log file so over time I imagine this file could get quite large, would be nice if could get to just send the append data, if anyone knows.

Enjoy

Damo

@echo off
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Run SyncToy Configure Folders in Application :::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Error Check, followed by bmail from beyondlogic.org ::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if errorlevel ( set result=FAILED
) else (
set result=OK
)
echo
bmail -s smtp.mailserver.ie -t (e-mail address removed) -f (e-mail address removed) -h -a "SyncToy Backup Completed Successfully" -m "C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\SyncToy\2.0\SyncToyLog.log"
This script works great when started from command line. However I have made some adjustments to also have it work when executed through task scheduler.

Important is that you add the location and .exe for the bmail.exe file. If your bmail.exe is located at c:\ root then you should put;

c:\bmail.exe

I also updated the script for Windows 7 directory structure and latest Synctoy 2.1 version.
Because the log file can grow very big I also added a delete function that deletes the old logfile. So user will receive log of the latest sync in email.

See example below.

@echo off
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Delete old logfile first :::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
del C:\Users\username\AppData\Local\Microsoft\SyncToy\2.0\SyncToyLog.log
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Run SyncToy Configure Folders in Application :::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"C:\Program Files\SyncToy 2.1\SyncToyCmd.exe" -R
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Error Check, followed by bmail from beyondlogic.org ::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if errorlevel ( set result=FAILED
) else (
set result=OK
)
echo
c:\bmail.exe -s smtp.mailserver.ie -t (e-mail address removed) -f (e-mail address removed) -h -a "SyncToy Backup Completed Successfully" -m "C:\users\username\Local Settings\Application Data\Microsoft\SyncToy\2.0\SyncToyLog.log"
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Synctoy logging 2
synctoy + .net 2.0 1
SyncToy and .Net 2.0 9
SyncToy 2.0 fragments all files. 0
SyncToy Beta 2.0 3
Synctoy message about log file 0
Synctoy Logged off 1
Will SyncToy 2.0 and SyncToy 1.4 co-exist? 0

Top