PDA

View Full Version : Exclude a Parent Directory, but Include a Child?


tired
15-Jun-2006, 02:48 PM
I apologize if this sort of thing has been asked; I did search, but it's not an easy query to search on.

What I want to do is simple, but I can't seem to make it work: I have a large 3D game installed to a certain directory on my hard drive, but I only want to sync the subdirectory thereof that contains the ever-changing "savegames" files.

Specifically, here are the directories:

Parent install directory:
D:\Games\Quake 4\

Savegames directory:
D:\Games\Quake 4\q4base\savegames\

Is there a way to exclude all directories under D:\Games\Quake 4\ (and exclude that directory itself), yet still sync D:\Games\Quake 4\q4base\savegames\?

Craig
15-Jun-2006, 03:47 PM
Open the "File Filters" dialog from the Session menu. Remove the '*' from the "Include Folders" area and replace it with a filter that only matches D:\Games\Quake 4\q4base\savegames. Assuming your base folder is D:, that would mean adding this line:

.\Games\Quake 4\q4base\savegames

tired
15-Jun-2006, 06:30 PM
Thank you. I neglected to mention that this same session is already used to sync the entire D:\ directory. This is where the confusion comes in, and I apologize for failing to explain it well.

So basically, I would like to sync everything under D:\, and exclude D:\Games\Quake 4\, with the exception of D:\Games\Quake 4\q4base\savegames\.

I'm thinking the only way to do this without manually excluding every single undesired directory is to use an entirely separate session.

Chris
16-Jun-2006, 02:41 PM
It might work to filter out the contents of each subfolder in the Quake 4 subdirectory.

Here's an example:

-.\Games\Quake4\*.*;-.\Games\Quake4\q4base\*.*

If you use .\dir\*.*, it will only filter out the files in that directory. Using the filter .\dir\ affects that directory and all subdirectories.