Shirt Pocket Discussions

Shirt Pocket Discussions (http://www.shirt-pocket.com/forums/index.php)
-   General (http://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   Excluding files by pattern (http://www.shirt-pocket.com/forums/showthread.php?t=5122)

mike 03-20-2009 09:58 PM

Excluding files by pattern
 
When I am backing up, I would like to exclude files and folders that match certain patterns:

.DS_Store
*~
*.bak
*.tmp
build (a folder name)
etc.
The script command Item Specification seems to require an absolute path from the root, though. Is there a way to specify a file pattern that will be matched wherever it occurs?

If not, could that feature be added? It would be very useful.

dnanian 03-20-2009 11:29 PM

No. Of course, you can use wildcards at any given folder level -- e.g.

*/*/*/*.bak

mike 03-21-2009 01:18 AM

Order of precedence
 
Ah... So if I create a rule file called "exclude backup files" that rejects

ignore *.bak
ignore */*.bak
...
ignore */*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.bak
and include it in a new copy script, then in that script I say to

copy Projects
Will the file Projects/MyProject/MyFile.txt.bak be included or excluded?

dnanian 03-21-2009 07:22 AM

It should be ignored.


All times are GMT -4. The time now is 05:13 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.