How does this work for subfolders and folders with a space?
regex:^(?!d:\\misc\\).*\.lnk$ works, but what if I want it to work for:
d:\all misc\
d:\misc\all misc
How to search files of a certain extension UNLESS they are in a certain folder?
Re: How to exclude files of a certain extension UNLESS they are in a certain folder?
Spaces are treated as literal in exclude filters.
For example:
regex:^(?!d:\\all misc\\).*\.lnk$
For example:
regex:^(?!d:\\all misc\\).*\.lnk$
Re: How to exclude files of a certain extension UNLESS they are in a certain folder?
Apologies, I should have said in search as opposed to the exclude filters
Re: How to search files of a certain extension UNLESS they are in a certain folder?
Please use double quotes (") to escape spaces in a search:
For example:
regex:"^(?!d:\\all misc\\).*\.lnk$"
For example:
regex:"^(?!d:\\all misc\\).*\.lnk$"
Re: How to search files of a certain extension UNLESS they are in a certain folder?
Thanks, I was putting the double quotes in the wrong place.
How about for sub folders? Just in the to delete folder:
D:\new folder (2)\to delete
And all folders underneath to delete:
D:\new folder (2)\to delete\folder 1\folder 2\
How about for sub folders? Just in the to delete folder:
D:\new folder (2)\to delete
And all folders underneath to delete:
D:\new folder (2)\to delete\folder 1\folder 2\
Re: How to search files of a certain extension UNLESS they are in a certain folder?
subfolders are included by default, if you don't want subfolders, please try the following:
regex:"^(?!D:\\new folder (2)\\to delete\\[^\\]*\.lnk$)"
This is easier without regex:
!*.lnk | "D:\new folder (2)\to delete\*.lnk"
(no subfolders)
!*.lnk | "D:\new folder (2)\to delete\**.lnk"
(subfolders)
regex:"^(?!D:\\new folder (2)\\to delete\\[^\\]*\.lnk$)"
This is easier without regex:
!*.lnk | "D:\new folder (2)\to delete\*.lnk"
(no subfolders)
!*.lnk | "D:\new folder (2)\to delete\**.lnk"
(subfolders)