Don't Delete Specific Files

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
phred
Posts: 709
Joined: 26 Dec 2021 02:10
Location: XY 64bit on Win10 at 100% from Boston USA

Don't Delete Specific Files

Post by phred »

Using 23.70.0200

I have a directory on my D: drive called TempStuff where I place lots of files which I will often delete all at once. In this directory I always have two files which I want/need to stay there and not get deleted. I have marked them as Read Only. Sometimes there are so many files in this directory that I simply select all and hit delete forgetting that there are two files in there that I want to keep. Which deletes the two files marked R/O and which I don't want to delete.

I'm looking for a suggestion that will prevent those files from being deleted. I'm hoping that there's something within XY that can do the trick. But if not, I'm open to suggestions.

Thanks.

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Don't Delete Specific Files

Post by highend »

The XY way is to use a ghost filter to hide those two files
One of my scripts helped you out? Please donate via Paypal

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Don't Delete Specific Files

Post by LittleBiG »

I can imagine a different solution. Create a visual filter which excludes those 2 files from the list, for example this way "Hide permanent files" !("File1.exe" | "File2.exe") then save a Folder view with this visual filter.
When you enter this folder, those 2 files will always be excluded, but if you need them for some reason, you can easily remove the visual filter temporarily by double click on the visual filter bar. It won't change the folder view, so next time you enter the folder the filter will be set.

phred
Posts: 709
Joined: 26 Dec 2021 02:10
Location: XY 64bit on Win10 at 100% from Boston USA

Re: Don't Delete Specific Files

Post by phred »

Thanks highend and littleBIG. Looks like I'll be experimenting with both methods to see which works best for me.

phred
Posts: 709
Joined: 26 Dec 2021 02:10
Location: XY 64bit on Win10 at 100% from Boston USA

Re: Don't Delete Specific Files

Post by phred »

After some testing, the winner is highend's solution. Thanks highend for showing me the XY way.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Don't Delete Specific Files

Post by LittleBiG »

phred wrote: ↑12 Oct 2022 02:55 After some testing, the winner is highend's solution. Thanks highend for showing me the XY way.
Of course you use what fits better for you. Highend's solution is simpler to set up.
Mine has an advantage though: if you have to switch it off temporarily, you simply cannot forget to switch it on again, because it is automatic. Also, it won't affect your other hidden items, because they will still remain hidden, even on other tabs. Ghost filter off makes everything appear (if you have more items in the ghost filter setup, not just this folder.) But it could be your desire outcome of course.

phred
Posts: 709
Joined: 26 Dec 2021 02:10
Location: XY 64bit on Win10 at 100% from Boston USA

Re: Don't Delete Specific Files

Post by phred »

LittleBiG wrote: ↑12 Oct 2022 12:20
phred wrote: ↑12 Oct 2022 02:55 But it could be your desire outcome of course.
I understand the difference between the two. At the present time, the ghost filter is all I need for my use case. I can always switch to your (LittleBig's) method.

I still thank you both.

Post Reply