Exclude All but One File in Backup #3407
-
Is there a way to exclude everything else in a folder except one file? I want to exclude all log files except the latest log. Is there any wildcard I can apply that would help me accomplish that? I have tried using "!", getting the idea from https://superuser.com/questions/430918/how-can-delete-all-files-except-one-from-a-directory. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The format used is the same as
You can whitelist multiple files, folders, or subtrees by adding more with |
Beta Was this translation helpful? Give feedback.
The format used is the same as
.gitignore
. So the example below would first ignore all files with a wildcard*
and then unignore a specific file or a folder with!
.You can whitelist multiple files, folders, or subtrees by adding more with
!