Issues and Tips with SyncToy v2 command-line

T

Tony G

These tips might help someone trying to use the command-line, and it's an FYI
to Microsoft as well.

The command to create a folder pair is :

synctoy -d(left=, right=, name=,operation=Synchronize|Echo|Contribute,
[check=yes|no], excluded=,included=)

That's a copy/paste from the help file. Note that there is a space before
"right=", but not before "operation=", etc. The command-line is not
forgiving of spaces. Spaces must Not be present in the command-line or the
command fails.

The open parenthesis must also immediately follow the -d. The trailing
close parenthesis is also required, but no error is displayed and the command
will look like it's successful even if it fails. See below.

As expected, use quotes around paths with spaces:
(left="c:\my source",right="d:\my target"...)
Failure to do so will result in a transparent error as indicated above.

The 'check' parameter _must_ by 'yes' if you want to check files. If the
value is 'y' or anything else the value is not set.

Microsoft: "synctoy -uBadProfile" causes a GUI dialog to launch to display
the error. This wouldn't be the preferred behavior in a lot of cases. A
dialog also displays if the right/target path isn't valid. Can you add flags
for sending errors to GUI, Log, or STDOUT? The error does not hit the .log
file, but there are a lot of files like this: SyncToyAppRuntime-0n.DAT.
Hint: These binary files begin with "MSQM". ;)

When the commandline with -d fails the following error is saved to the log:
Exception handled:Length cannot be less than zero.
Parameter name: length
That error seems to be used for a number of errors, making problems
difficult to diagnose. One example is if the trailing parenthesis is missing.
Another is when quotes are missing when a path has spaces. I understand
what's happening, I'm just commenting on the silent failure and non-specific
error message.

Final question: You can't change a profile from the command line, you must
delete and recreate it with a -u and -d operation. Does this do anything to
mess up the synchronicity of the source and target?

HTH
(Say, how much do people at Microsoft get paid to do QA? LOL)
 
T

Tony Gravagno

(I'm the same Tony G, posting from usenet now instead of Microsoft
site.)

I'll add a couple more items to this thread:

Minor bug/typo: tooltip for Files to Exclude in Change Options dialog
says 'include'. (Hey, if this is as bad as it gets then you guys are
doing pretty good.)


Proposal for Enhancements:

- Please allow Select Subfolders form to scale in size to avoid
horizontal scrolling.
- Also in Subfolder selection, rather than displaying the entire path
on every tree node, please add an option to start at the root node
which will change the repeating (and sometimes Long) path in every
node to a simple "...\". For Inclusion this may not be so helpful,
but for Exclusion, every node is guaranteed to be repetitive.
- Please document how to include/exclude entire paths from the command
line. (This is the next thing I'm going to look at. I'm concerned
command-lines will get too big with too many long paths embedded.)
- Combination of items 2 and 3 - assuming we can use a path in the
command-line, please allow command-line to use "..." syntax for path
Exclusion.
- Please allow export of profile to a text file so we can check syntax
or import the data into another app if we wish. For example, export
all profiles to a .BAT which we can copy to other systems, modify and
re-import, etc.
- Please allow the size of the All Folder Pairs grid to expand in size
to accommodate the form. Right now it remains the same size no matter
how wide the form is. You can maximize and increase the size of the
form but the grid (and surrounding panel) are always the same size.
(So what good is that? :) )

That's it ... for now... ;)
 
T

Tony G

Continuing...

1) Is there any way to save files in a dir and not the other folders? For
example, I have a single directory that has a huge number of subdirectories.
I don't want to save any of the subdirectories, I'm saving them in separate
pair/profiles. I just want to save whatever files get posted to this single
directory.

2) Can we group the profile/pairs so that we can run backups in batches? So
far I have about 30 profiles that I either need to run all at once, or I need
to check off groups of them manually.

3) Given the above scenario, let's say I add a new sub-directory to the root
mentioned above which is not being saved. For example, under a Transactions
folder maybe I'll have Jan and Feb, later March, etc. Since the Transactions
folder isn't being saved SyncToy won't be aware of new folders. Can someone
recommend a good practice for finding folders that are nested in tree
structures but not getting saved? I was thinking about writing a program that
would find folders that do Not have SyncToy_zzz hidden folders, and use my
own FileSystemWatcher routine on them to log changes where a new profile may
need to be created.

4) Why is this file being modified during the SyncToy run? I'm certainly not
using Windows Media during a backup.
\Local Settings\Application Data\Microsoft\Windows Media\11.0\WMSDKNS.XML
I get this same message in every run: "Error: The source file has been
modified during the synchronization process. The data is invalid." The last
modified date on that file is about a month ago.

5) I'm surprised a log entry isn't created when a sync starts. I'm getting
errors like this first:
SYNC: 12/04/2007 15:57:07:218: Error: …
And then at the very end I see:
SyncToy run of My_Pair_Name (...) completed at 12/4/2007 4:32:08 PM.
SyncToy action was 'Contribute'.

6) Note from the above that the time format for errors is 24 hour format but
the format for the completed message is AM/PM format. Not that it matters
much but it would be nice if it were consistent.

7) I believe I read another posting about this. When we minimize the Preview
form, the main window with File/Help menu stays on screen. Because Preview is
a modal we can't minimize its parent. I right click on the task bar and from
the right-click context menu click Show Desktop. That minimizes everything
but at least I can see my screen again.

8) Understandably to some extent, I'm getting some files that can't be saved
from every run with the following source path:
C:\Documents and Settings\tony\Local Settings\Application Data\Microsoft
The files ar mostly .dat files, a "Windows Defender\File Tracker\{GUID}
file, and of course synctoylog.log itself.
I'd like to be able to exclude specific files not files with specific
extensions. Can someone recommend the best method to do this?

9) In the Preview and Errors pages can you show the name of the
Pair/Profile? When an error says a file isn't going to be saved because it's
already there I'd like to know which profile I need to tweak without reading
the .log.

10) On the error grid, when the Error column shows "Error: Cannot read from
the source..." The Source file and Source Path columns are empty and the
actual Source path is displayed in the Target Path column.

11) Saved the best for last, I got an exception when checking errors:
************** Exception Text **************
System.ArgumentOutOfRangeException: InvalidArgument=Value of '6' is not
valid for 'index'.
Parameter name: index
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate
method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at System.Windows.Forms.Control.Invoke(Delegate method)
at SyncToyUI.PreviewDialog.DisplayErrors()
at SyncToyUI.PreviewDialog.lnkLabelSeeErrors_LinkClicked(Object sender,
LinkLabelLinkClickedEventArgs e)
at
System.Windows.Forms.LinkLabel.OnLinkClicked(LinkLabelLinkClickedEventArgs e)
at System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.LinkLabel.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
*********


Still hoping to see answers to other questions about using command-line to
exclude folders. If the SQL database is open for update then I'll do it that
way after the profiles are created. Just let me know.

Just as an FYI for anyone using SyncToy, it seems to skip open files, like
other backup programs. So you really need to make sure all possible apps are
closed before running a backup. Certainly MS Office apps, also tools like
Skype and maybe other tray utilities and background services.

That's all for now. (Aint that honkin enough?! :) )
 
T

Tony G

I'm confused as to why there is no response from Microsoft to these postings
on SyncToy. Is there a more appropriate place to post notes on the SyncToy2
Beta? I was hoping to keep feedback flowing in both directions so that I can
get the most out of the software and Microsoft can get a better beta. Isn't
that what a beta is for?

Thanks.
 
S

Swifty

Tony said:
I'm confused as to why there is no response from Microsoft to these postings
on SyncToy. Is there a more appropriate place to post notes on the SyncToy2
Beta?

Well, SyncToy is free. I'd say that we're getting considerably more than
our money's worth here.
Imagine that it's developed by one person (that's conceivable; I've
developed more complex applications). He's probably off implementing the
last good idea that someone proposed; hopefully one of mine :)
 
T

Tony Gravagno

Swifty said:
Well, SyncToy is free. I'd say that we're getting considerably more than
our money's worth here.
Imagine that it's developed by one person (that's conceivable; I've
developed more complex applications). He's probably off implementing the
last good idea that someone proposed; hopefully one of mine :)


My apologies. I realize that SyncToy is a part of the PowerToys group
and that it used to be unsupported. Checking the v2 download page I
see it is in the same status - I honestly thought this status had
changed for v2.

Unfortunately, as a developer myself, I can't put a lot of faith in
software that is only maintained by one or two people in their free
time, especially when there is a beta in progress and I'm not getting
answers to bug or usability notes. That's the way people evaluate
software - if the developers are responsive (whether we agree or not)
then we know they are as interested in their software as we are. When
I find the developers aren't all that interested, or at least not
interested in feedback to their beta, then I look elsewhere.

The problem is further compounded in that this software isn't open
source. I don't necessarily want it to be, I'm not one of "those"
people, but if it was OSS I could get my own answers and maybe fix
issues or add enhancements that concern me, and then we'd all benefit.
With no support and no source I'm afraid this utility falls into the
same category for me as any other software that haven't been updated
by anyone in a couple years (like if you see a program relies on the
VB4 runtime it's probably time to look elsewhere) - again, if no one
else is interested then perhaps I shouldn't be either.

I know a lot of people here are enamored with SyncToy, but there are
too many reasons to not use it for anything beyond syncing pictures.
If that's what you need, great. As a developer I need a more
versatile sync utility. I thought I could create a low-maintenance
backup environment with SyncToy. I was wrong, it seems too limited
and I don't have faith in the source of the offering. I don't want to
start using something today that Microsoft or anyone else will lose
interest in tomorrow. It takes time to setup a good sync environment,
especially for multiple PCs, and I have made that investment in
several backup utilities so far already and here I am looking for
another one because they were also inadequate for the same or
different reasons. YMMV
 
S

Swifty

I suspect that the "Toy" in SyncToy is an intentional hint.

Having said that, I have three hard drives here in my PC at home, a USB
memory key and a Linux server in my employer's local branch office.
SyncToy handles all my backup/syncs completely automatically. All I have
to do is visit a webpage that I created which gives me a view of the log
from the previous run, with any errors highlighted. These are nearly
always because my over-zealous backups have encountered an obscure file
which is locked, so I then exclude it.
 

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

Top