AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delete a file without confirming

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
membersound



Joined: 07 Mar 2009
Posts: 80

PostPosted: Sun Aug 09, 2009 8:41 pm    Post subject: Delete a file without confirming Reply with quote

Hi folks,

I would like to write a script that allows me to delete a file without confirming that I really want to delete this file. The file should then be moved to recycler as usual.
XP offers just possibilities to a) bypass the confirmation constantly, or b) delete files without moving to recycler.

My intention is to create a quicklaunch button that deletes marked files to recycler.
If I instead use my DEL on keyboard I wish to confirm. So I need a routine bypassing the confirmation. 'FileRecycle' would be good. But how do I detect which files have been selected to delete?
Could you help?

Thanks in adavance.
Back to top
View user's profile Send private message
vahju



Joined: 17 Feb 2008
Posts: 296

PostPosted: Mon Aug 10, 2009 12:15 am    Post subject: Reply with quote

On Windows XP you can press Shift+Del to delete a file without it going to the recycle bin. Here is website that explains what happens. Of course you have to highlight or select the file first then press shift+del.
Back to top
View user's profile Send private message
lilalurl.T32



Joined: 17 May 2007
Posts: 391
Location: Titan

PostPosted: Mon Aug 10, 2009 12:28 am    Post subject: Reply with quote

If I am not mistaken what membersound wants is to be able, when desired, to skip the delete confirmation message, which still appears even if you use Shift+Del (unless ofc if you disable it in the reycle bin options).


Here is a recent thread that dealt with a more or less similar issue (passing file paths to a script, by using the clipboard and parsing the file paths):
http://www.autohotkey.com/forum/viewtopic.php?t=45817

Hopefully that should provide you with a working example.
________
HOMEMADE VAPORIZERS


Last edited by lilalurl.T32 on Sun Mar 13, 2011 6:44 am; edited 1 time in total
Back to top
View user's profile Send private message
membersound



Joined: 07 Mar 2009
Posts: 80

PostPosted: Mon Aug 10, 2009 2:07 pm    Post subject: Reply with quote

lilalurl is right. I am looking for to skip confirmation if desired. Thanks for the example, think I will go ahead with that.
Back to top
View user's profile Send private message
Hasso



Joined: 23 Mar 2005
Posts: 321
Location: Germany

PostPosted: Tue Aug 11, 2009 8:08 am    Post subject: Reply with quote

Wait for the confirmation window and then press "No"
Code:
WinWaitActive, confirm
send, n

_________________
Hasso

Programmers don't die, they GOSUB without RETURN
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group