| View previous topic :: View next topic |
| Author |
Message |
membersound
Joined: 07 Mar 2009 Posts: 80
|
Posted: Sun Aug 09, 2009 8:41 pm Post subject: Delete a file without confirming |
|
|
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 |
|
 |
vahju
Joined: 17 Feb 2008 Posts: 296
|
Posted: Mon Aug 10, 2009 12:15 am Post subject: |
|
|
| 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 |
|
 |
lilalurl.T32
Joined: 17 May 2007 Posts: 391 Location: Titan
|
Posted: Mon Aug 10, 2009 12:28 am Post subject: |
|
|
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 |
|
 |
membersound
Joined: 07 Mar 2009 Posts: 80
|
Posted: Mon Aug 10, 2009 2:07 pm Post subject: |
|
|
| 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 |
|
 |
Hasso
Joined: 23 Mar 2005 Posts: 321 Location: Germany
|
Posted: Tue Aug 11, 2009 8:08 am Post subject: |
|
|
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 |
|
 |
|