Delete which skips locked files

Features wanted...
jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Delete which skips locked files

Post by jacky »

This is a very nice feature you got there! :D
admin wrote:(1) SHIFT + delete (skip locked): -> no recycle bin
Actually, this would be pretty cool! But maybe you don't realize that we can already kinda do it. I was trying to do delete all the files in my temp folder but didn't want to send them to the bin: just hold shift after XY's msgbox (but if no items are locked, then you have to hold it in the end when XY calls the API, oh well you got the idea...).
It's kinda weird, cause you have to do it twice if you have empty folders to remove too, and it's kinda unnatural to hold shift after an msgbox instead of when starting the action, so I'll wait for the Ctrl+Shift+Del ;)

admin wrote:BTW: I wonder whether I should generally do CTRL+DEL -> skip locked. But this needs careful consideration... later.
I'd vote for it! :D

And also, you forgot to turn the mousepointer to an hourglass when you do your step1, so one could wonder "whats going on? is there anything going on??"
That, plus something on the statusbar (3rd panel) mentionning what's hapenning (like "Looking for locked items...") would be nice I think ; and make ESC cancel the whole thing.
Proud XYplorer Fanatic

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Delete which skips locked files

Post by admin »

jacky wrote:This is a very nice feature you got there! :D
admin wrote:(1) SHIFT + delete (skip locked): -> no recycle bin
Actually, this would be pretty cool! But maybe you don't realize that we can already kinda do it. I was trying to do delete all the files in my temp folder but didn't want to send them to the bin: just hold shift after XY's msgbox (but if no items are locked, then you have to hold it in the end when XY calls the API, oh well you got the idea...).
It's kinda weird, cause you have to do it twice if you have empty folders to remove too, and it's kinda unnatural to hold shift after an msgbox instead of when starting the action, so I'll wait for the Ctrl+Shift+Del ;)

admin wrote:BTW: I wonder whether I should generally do CTRL+DEL -> skip locked. But this needs careful consideration... later.
I'd vote for it! :D

And also, you forgot to turn the mousepointer to an hourglass when you do your step1, so one could wonder "whats going on? is there anything going on??"
That, plus something on the statusbar (3rd panel) mentionning what's hapenning (like "Looking for locked items...") would be nice I think ; and make ESC cancel the whole thing.
All agreed and done. 8)

j_c_hallgren
XY Blog Master
Posts: 5824
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Post by j_c_hallgren »

:idea: This feature is one of those little things that can be used as a sales tool, and should be advertised as almost all are bugged by the way Win Expl doesn't handle this very well...
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

j_c_hallgren wrote::idea: This feature is one of those little things that can be used as a sales tool, and should be advertised as almost all are bugged by the way Win Expl doesn't handle this very well...
Yes. Actually I plan to add a section to the homepage à la "The XYplorer Experience -- Happy users confess why they bought XYplorer". Non-anonymous little quotes would be best like "Uncle Scrooge, Ducksburg: I bought XYplorer because it finally solved the locked file issue which made my life so miserable for years!"

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

One more thing. Most of us appear to use the new Delete Skip Locked to clean the TEMP dir. During implementation I tested the code doing the same thing. Worked well: I deleted everything but the locked files. Also the readonly files (answered Yes to the prompt). When I then wanted to save the code, the app I use for coding XY told me that a certain file was missing and that therefore it would not save the code! :shock: :lol: So the new code threatened to commit suicide. Fortunately I could restore the file from the recycle bin and nothing was lost.

So: some apps rely on files in the TEMP dir without necessarily having them open (and thus locked) all the time. Instead they mark them as readonly. So, maybe it would be an idea to also skip readonly files!?

allen
Posts: 89
Joined: 10 Sep 2006 19:25
Location: Northern Maine

Post by allen »

Maybe the "yes/no" dialog should have check boxes so you can skip read only, skip locked, or both.

Interestingly enough, I just attempted to clean the temp directory and had a little pre-mature termination of the purging--

Code: Select all

---------------------------
Error Deleting File or Folder
---------------------------
Cannot delete 2984: Access is denied.

Make sure the disk is not full or write-protected
and that the file is not currently in use.
---------------------------
OK   
---------------------------

itsme28m
Posts: 124
Joined: 03 Sep 2006 16:49
Location: Belgium

Yes, as an option...

Post by itsme28m »

Yep, it should be a good idea to have the option to also skip readonly files. But not to skip them at default. Because if xyplorer does this automatically, then you would have problems with files that you copied from a cd or dvd, those are all read only files, so when u want to delete a folder that's copied from cd/dvd all files in that directory would be skipped... Since the temp folder is the most folder used for this function, it's good to have the option to skip read-only files, but only as an option.

hm, or maybe the nuke button to not skip readonly files, and the other options to skip readonly files? Another message coming up to also skip readonly files would be to much i gues... Any other ideas from others about this one?

Edit, since i read the post from allen, i agree with him, if it's possible, checkboxes in the yes/no dialog would be the best way i gues.

Greetings,

Steve

j_c_hallgren
XY Blog Master
Posts: 5824
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Post by j_c_hallgren »

:?: How does this function deal with "Desktop.ini" files? As I'm looking to use XY to clean up some folders that require the INI file to be kept...and manually locating and excluding it might be required, but thought I'd ask if there was something simple I've overlooked...as there are hundreds of files within these folders of all types...

Update: Realized that using VF would do the exclude...but query remains for those type of control files..
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:When I then wanted to save the code, the app I use for coding XY told me that a certain file was missing and that therefore it would not save the code! :shock: :lol: So the new code threatened to commit suicide.
hehe.. that's why there's an option to always save before running (or at least ask you if you want to, whish you should ;))

I don't think RO files should be ignored by this process, only locked. Besides, I get the usual "do you wanna delete the files?" confirmation, but if some files are RO I'll get the "it is RO, are you sure?" extra-confirmation so.... seems good to me.

What is weird, I think, is that we get nothing when no files are locked. I understand just an msgbox to say "No files were locked, here we go... " might sound useless, but it would also, me thinks, "confirm" to the user that yes, he used the Skipped Locked feature and it is working.
Cause right now, you do Ctrl+Del and in such case get the usual confirmation window, which could mislead one into thinking that the Skipped Locked feature didn't work/wasn't triggered.. ?

Maybe what could be done is to "expand" this feature to this: "Copy All But Locked Files To Clipboard". Cause the same error happens when you try to copy/move files with one or two locked: error, abort, some files have been copied/moved, others haven't, you're fucked, have a nice day. :?
Allthough for all of this, ideal would be that XY handle file operations himself instead of using windows APIs.....

@j_c_hallgren: you could simply use a search maybe? Like go in the folder you want to "empty" (of everything but destop.ini files or such), then Go to: "?:!desktop.ini or otherfile.ext /r" (meaning search for all files but desktop.ini, etc and recurse folders).
Then select all files and Ctrl+(Shift+)Del. XY will look for locked files, and you'll be set to delete all but locked files, desktop.ini and w/e other files or specified on the name search!
Proud XYplorer Fanatic

j_c_hallgren
XY Blog Master
Posts: 5824
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Post by j_c_hallgren »

I suppose my query could be morphed into a config option? As which file attributes one wished to skip via this type of delete...Locked plus read-only and/or hidden and/or system...so you could just do a select all and then let the delete function skip over the ones that need to be kept according to users desire...as compared to having to do a find/search to exclude those first...does that make more sense?

Jacky, as noted in my "Update", I used a VF to bypass my INI files which worked fine...it was just having to remember to do such next time that caused this reply...

And I agree using the Del Locked and having it go straight to delete was a bit weird the first time, but then realized that I must not have had any locked files so prompt could be skipped...so having it msg me would be nice but only as a flashed msg not requiring reply.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

j_c_hallgren wrote:Jacky, as noted in my "Update", I used a VF to bypass my INI files which worked fine...it was just having to remember to do such next time that caused this reply...
Oh ok, but then you're going to something else than just "Skipped Locked" aren't you? ;) Maybe have a Catalog item that set the VF or do the Name Search you want in the current location, and just click it before selecting your files. (ok, this is not helping the "remembering " part ;))
Proud XYplorer Fanatic

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

jacky wrote:
admin wrote:When I then wanted to save the code, the app I use for coding XY told me that a certain file was missing and that therefore it would not save the code! :shock: :lol: So the new code threatened to commit suicide.
hehe.. that's why there's an option to always save before running (or at least ask you if you want to, whish you should ;))
I always do, but the story was better like this. :wink:

jacky wrote:I don't think RO files should be ignored by this process, only locked. Besides, I get the usual "do you wanna delete the files?" confirmation, but if some files are RO I'll get the "it is RO, are you sure?" extra-confirmation so.... seems good to me.
Yep, right, I'll won't change anything here.
It's only a possible trap for folks that Nuke or turn off delete confirmation. They have been warned: just skipping locked files does not mean automatically that everything you delete is useless garbage. Some unlocked files might be important as well...
jacky wrote:What is weird, I think, is that we get nothing when no files are locked. I understand just an msgbox to say "No files were locked, here we go... " might sound useless, but it would also, me thinks, "confirm" to the user that yes, he used the Skipped Locked feature and it is working.
Cause right now, you do Ctrl+Del and in such case get the usual confirmation window, which could mislead one into thinking that the Skipped Locked feature didn't work/wasn't triggered.. ?
Agreed.
jacky wrote:Maybe what could be done is to "expand" this feature to this: "Copy All But Locked Files To Clipboard". Cause the same error happens when you try to copy/move files with one or two locked: error, abort, some files have been copied/moved, others haven't, you're fucked, have a nice day. :?
Hmm, yummie. Would nicely fit into "Paste Special" which then needs to be renamed to... uhm... "Clipboard Special", hey, we have discussed that before somewhere...
jacky wrote:Allthough for all of this, ideal would be that XY handle file operations himself instead of using windows APIs.....
Another day... certainly a biggie... I'm already collecting ideas for it... but first things first...

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

allen wrote:Maybe the "yes/no" dialog should have check boxes so you can skip read only, skip locked, or both.

Interestingly enough, I just attempted to clean the temp directory and had a little pre-mature termination of the purging--

Code: Select all

---------------------------
Error Deleting File or Folder
---------------------------
Cannot delete 2984: Access is denied.

Make sure the disk is not full or write-protected
and that the file is not currently in use.
---------------------------
OK   
---------------------------
So what's it with '2984'? Is it a file or folder? Anything special about it?

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

j_c_hallgren wrote::?: How does this function deal with "Desktop.ini" files?
It kills them! :P

Really, I should not have started this "skip RO files, too?" debate. Because: XY does "efficiently automate frequently recurring tasks" but it does not replace your brain. I never liked software that tries to be "smart" because it's often dumb and dangerous.
So XY plays it very simple: if you select a "Desktop.ini" file and opt to delete it, XY will delete it (in this case, normally you will be asked if you want to delete a system file).
The "skip locked files" service is an exception of the no-smartness rule because Windows is so incredibly dumb with this. The smartness here: you select a locked file and want to delete it, and XY internally simply ignores that selection because "it knows better". It's only half-smart infact, because you told XY "Please, correct my naive selections, oh master app!" when you opted for "Delete (Skip Locked)".

j_c_hallgren
XY Blog Master
Posts: 5824
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Post by j_c_hallgren »

Ok... :oops: Forgot that System files will cause a prompt in 2nd pass!

And...as locked is something that isn't visible externally, that's what makes it unusual...but what about read-only?

As I understand it (correct me if wrong), RO can be set as attribute on file and remain set until changed (and is thus visible in list and can be filtered that way)
-OR- the file can be opened by an applic as RO, in which case, it is not visible, so user may select files that are currently in use without knowing it, correct? So our brain may not know what files are being used and thus is what would be helpful to detect and leave those alone...
Last edited by j_c_hallgren on 21 Sep 2006 09:25, edited 1 time in total.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

Post Reply