Hello everybody!
I'm trying to exclude all temp Word files from mirroring, but seems that it won't work...
I created a rule with "exclude file" with ~$*.doc but the files are still copied.
am I doing it wrong?
Thanks! (:
New: Kanri (Oct 9, '24), Platform 29.5.3 (Jun 27, '24)
1,100+ portable packages, 1.1 billion downloads
No Ads November!, Please donate today
is the form of the temp files? Your regex looks ok at a quick glance, but I am not exactly sure what you are trying to match!
If that's meant to be a regular expression, not a glob expression, then the
*
should be.*
.I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
I'm trying to 'ignore' files like ~$document_name.doc
I give up, I can't get it to work either.
I believe what the OP is trying to do is ignore any files that begin with the literals "~$" and then contain 0 or more alphanumeric characters, a period literal and the "doc" file extension. Wouldn't you have to escape the "$" and "." in a true regular expression? I'm assuming a "~" doesn't need to be escaped.
To the OP, shouldn't those files get normally get deleted? The only time they hang around is if you:
Steve, I've also noticed that if you delete all of your rules-sets and then go back to the Sync tab, all the rules-sets previously created still appear. How do you handle refreshes between tabs? Is that one of the purposes of the Refresh button? If I modify a set of rules, how do I know that the Sync tabs is using the modified set of rules and not the previous version? Likeiwse, if I use "Preview" does in then load the rules, or does it used some sort of cached copy? It almost feels like there's a disconnect between the sync and rules tabs (at least in 3.0.3)
Yeah, like you said these files are normally deleted when you close Word, but sometimes Word/PC crashes and they are left behind in folder.
On my work place we use shared folders and it's not uncommon these files appear.
If it's meant to be a regular expression,
*
means any number of the previous atom - so you should put a.
before it, which matches any character:(Second . escaped to make sure it's a literal .)
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Still not working. I gave up that.
-
Another problem:
I have set some folders to exclude, it's working fine, the content of the folder isn't copied (as it should be), but the folder itself and all subfolders are created on destiny (empty, of course).
Wouldn't be correct not create the folders we put on "folder to exclude"?
The regexes in Toucan aren't POSIX necessarily (or whatever the right term is) they're some kind of hybrid WXWidgets creation. I don't find the WxWidgets documentation particularly helpful. Some examples in the documentation wouldn't go amiss.
In addition, the Toucan documentation states that you're supposed to begin a regular expression with an asterisk, which is very odd IMO (since it gives "*" a double meaning). It has been my experience that regexes should normally begin with a forward slash, but again this is probably part of the odd WxWidgets implementation.
As I mentioned above, technically you should probably escape the dollar sign too since that has syntactical meaning. However, I've tried many possible combinations of "normal" regular expressions I can think of, to no avail (not that I'm an expert).
In fact, I don't think I've got a single regular expression to work in Toucan so far, only a simple text exclusion.
I've been doing some more digging and it seems there's a problem with Toucan's regex parser. I don't know if it's part by design or part bug but I've reported it in the current development release thread.
for all of your comments here guys, you have spurred me on to properly sorting out some of the rules stuff. I am targeting a proper fix of this (along with a few other changes to the rules, like absolute excludes and a proper gui update) in the release after next I will try and also get a quite fix out in the next one and will update here when the next pre-release is out.
I use *~.* which seems to work fine. This rule ignores any file starting with a ~. If you wanted to ignore files starting with "~$" and ending with ".doc" try "*~\$.*\.doc" (which may not actually work).
As stated in the help file, rules must begin with "*" to be treated as regular expressions. This is at any rate a rather unintuitive way to do it. Perhaps you could just have a check box saying "This is a regular expression".
Thanks! Now it's working! But, why we need a dot after ~?
Although "*" is used to mean "match anything" in other pattern matching syntaxes, in regular expression "." means "match any single character" and "*" means "match the previous thing any number of times (including 0 times)", so ".*" means "match anything (including nothing)".
The syntax gets a bit complex, but regular expressions are possibly the most useful thing a computer user can learn. More here: http://www.regular-expressions.info/.
Ahhh... now I understood
I'll read more about regular expression.
Thanks again
Old topic but I found it in a google search so I thought I'd reply:
*~$* is the correct expression. I just tested it on a Word 2010 temp file.
Also someone asked why to do this when Word deletes these files automatically. Well I use RealtimeSync a lot so whenever I open a document in a synced dir (even if I don't save), it triggers the sync to occur after my specified delay. So this is useful to keep from copying a large amount of ridiculous files and deleting them again a min later.
Of course telling RealtimeSync to ignore even triggering the Sync when a ~$whatever file opens in the first place would be the real fix, but this is acceptable.