Shirt Pocket Discussions

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

mike 03-20-2009 08: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 10:29 PM

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

*/*/*/*.bak

mike 03-21-2009 12: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 06:22 AM

It should be ignored.


All times are GMT -4. The time now is 04:55 AM.

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