Jump to content
Sign in to follow this  
dirty

Is there an environmental variable for recycle bin in autoit ?

Recommended Posts

dirty

I used FileRecycle () function but if recycle is set to permanently delete, it will do the same.

Kinda like Network drive normaly delete files permanently.

So i wonder if there is a way to deal with that by performing FileMove () function to a location that would be default recycler folder returned by windows environment.

Is it possible other then C:\$Recycle.Bin

Share this post


Link to post
Share on other sites
dirty

Because button says "Recycle", not permanently delete

I used SID securitylookup function and consolewrite says

C:\$Recycle.Bin\S-1-5-21-1243983632-2743974577-3872314584-500\a.ini

which is correct. but the file is still not there and not in its source. So it was permanently deleted even when SID was given into FileMove function :graduated:

Oh well, ill try to look into _WinAPI_ShellFileOperation().

Thanks

EDIT:

Just looked at WinAPIEx

Its filesize it 2 times bigger then my project size LOL

No deal

Edited by dirty

Share this post


Link to post
Share on other sites
BrewManNH

I think what AdmiralAlkex was saying; if a user of your script has his recyle bin set to permanently delete rather than storing it in the recycle bin, it is not up to you to tell them they're wrong and you know better than they do. Plus, if they have it set to not use the recycle bin, and you send the file to somewhere like you said, they'd never find it again anyways because that folder doesn't show up unless you have show all files set in Explorer so you're doing something that you shouldn't be doing.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
Unsigned

Pretty sure trying to manually mess with the Recycle Bin (other than through the provided API) is a bad idea. It does not store files in the same way that a "normal" folder does.

This was the only official Microsoft documentation I could find on the subject, and it is over a decade old (only applies to Win98 and prior), and is no longer correct on modern systems (quick check on an XP system verified that.)

FileRecycle() does not mean "move file to the Recycle Bin." Rather, it means, "do whatever the user wants done with a deleted file."

And speaking as one who has the Recycle Bin disabled (when I delete a file, I expect it to be deleted!), I'd actually be pretty ticked off at any program that tried to second-guess me.

Edited by Unsigned

.

Share this post


Link to post
Share on other sites
martin

Based on the hostile reaction why don't you rename the button to "Backup" and add a "Restore" option. Anyone who objected to that is odviously mad and so can be ignored..

  • Like 1

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×