I was bored and took it as a challenge from here - https://portableapps.com/node/15746
This is the end result, FlashBin. The app runs in the tray and hooks the chosen hotkey. If files or folders have been selected it will prompt to Recycle them. Files on the same drive as the app will be moved to the FlashBin directory, which is configured in the INI file as a relative path to the app directory (omit a leading \), default is FLASHBIN in the same directory as the app. Files on other drives will be Recycled as normal.
The tray icon will show the state of the FlashBin file directory, and monitors the filesystem for realtime updates (I was proud of that :)). Certain 3rd party file managers do not notify the Windows Shell properly about file / directory changes, and will not trigger FlashBin's icon to change.
Download FlashBin 1.0.2.1
(MD5: 9f6fe240946f65d678fdcfedcfeeacd3)
Release Notes:
1.0.2.1 (2009-03-04)
- fixes and enhancements
- added "Open FlashBin" and "Empty FlashBin" tray commands
- files / folders are appended with a random sequence of characters when moved
1.0.1.1 (2008-09-26)
- added customizeable wait time for tweakers
- hopefully mitigated some XP issues
1.0.1.0 (2008-09-25)
- added customizeable hotkey
- fixed directory move problem
Known Issues:
- FlashBin only hooks the chosen hotkey, and will not catch deletes from an app's toolbar, menu, or a right-click -> delete.
SWEET! Somebody did something with it!
I is playing with it.
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
Cool! This would also be great if it could be integrated into Xenon!
It pretty much already is. As since FlashBin is hooking the delete key, it does when pressing it in Xenon as well. Though right-clicking and selecting Delete in Xenon will not work, there's not a huge point to incorporate it since pressing the delete key is so much easier. Nonetheless, I agree.
This is great.
Wraithdu,
You have officially Won
^-^
Now I don't have to make this.
P.S. Why did you use AutoIt instead of NSIS? Is NSIS incapable of making these type of programs or is there another reason?
There's 2 main reasons.
1. He is more experienced with AutoIt.
2. It's /much/ easier with AutoIt as NSIS is an installer language that just happens to be suitable for creating out launchers.
I always do Right Click -> Delete (what can I say, I'm mousebound), so this is a no-go for me. Not that I really need it: As I use my drive every day, for everything, I've just trained myself to double- and triple-check what I'm deleting. After having deleted an important file or two from my drive with no way to get it back, I've become very careful.
Of course, the downside to this retraining is that now the Recycle Bin itself causes me headaches. I'll recycle files without a second thought and then, when I see the papers in the bin, I empty it on impulse, usually without checking what's in it first--a very bad habit that entirely defeats its purpose. I'm actually /more/ cautious when I know that deletion is permanent.
Anyway, I completely went off on a tangent with this post. I'll stop now.
Unfortunately, hooking mouse clicks is pretty difficult and has a pretty good performance hit since you have to monitor every mouse click. You can't set hotkeys with the mouse buttons. Then I'd have to find a way to see which system menu item you clicked, which is a whole other rat's nest, not to mention the problem if you use a 3rd party file manager. Basically a real PITA and not worth the effort.
I don't know whether it would be useful for this project but have you seen the Fundelete software (and part of the soure code) developed by Mark Russinovich (of Sysinternals) before he joined Microsoft.
Look at https://forum.eviloctal.com/thread-14747-1-12.html for additional information and description of the techniques used.
If I can also extend the challenge:
Is it possible to create a portable software that when loaded can divert ALL file deletions to the appropriate recycle bin, on local and USB drives?
Regards,
Joe Aiken
Fundelete has a device driver component. Not gonna happen portably.
And FlashBin does not hook the system in any way. It is hotkey based, and works only for the Desktop and Explorer. This technique cannot accomplish what you ask.
LOL Thanks everyone. I had no idea it would be 8 posts popular What did I win?!
To answer one question, this would be a real bitch in NSIS. It was hard enough to figure out the function calls in AutoIt, especially for the shell notifications. Hell, I don't even know how to set a hotkey in NSIS. The language is just not designed for this kind of work.
I'll have a new version pretty soon that will have a little better shell notifications that will monitor the specific folder instead of the whole filesystem, and monitor for file creations as well as deletions. Bear in mind this is all JUST for the icon change!! I like a challenge and learning new stuff. It will also let you specify a different hotkey in case you don't want to hook the DELETE key. You'll have specify it in AutoIt terms in the INI.
Look for the release tonight or tomorrow.
Updated, see first post. Didn't get the shell notifications to work like I wanted, so I went back to the original method which works correctly.
hi-5
Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
I can't seem to get this to work, unfortunately, because it looked like a great little app. I'm running it from the C drive, I assume it can still work there?
One slight improvement to the packaging might be to put it in a separate folder (see Wikipedia's section on tarbombs for more information).
"If you're not part of the solution, you're part of the precipitate."
Can you include some more detail, such as your OS and the problem you are having? What is your assigned hotkey, and what happens when you press it?
He posted that if you run it from the C drive the files will just go to the regular recycle bin.
Not sure what your comment means, but FlashBin will work fine if you run it from the C drive. Files on drive C will go to FlashBin, files on any other drive will be recycled as normal.
Added a tweak for the wait time in the INI (see Readme). Also hopefully mitigated some performance issues on XP.
Remember this isn't a perfect solution, so it *may* hiccup from time to time. Best results are probably achieved by setting FlashBin to use its own hotkey.
PS - Did you know that CTRL+D is a system hotkey for the recycle bin? I did not...
Ctrl+D... well, that means sense. D for Delete. Not sure why they made two hotkeys for it, though. The Del key does the same thing...
Ummm...not with a Firefox window with the focus. Ctrl + D = "Bookmark this page".
I found that out the hard way just now...
Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
No, it doesn't open the Recycle Bin, it deletes the file that's selected in a folder (or the desktop). So it's a Windows Explorer hotkey, not a system one.
This would have real usefulness for me and many others if you could integrate an optional command to select certain files from the recycle bin and run them through Eraser Portable or another shredding program. Any possibility?
Never kiss your honey
when your nose is runny.
You may think it's funny,
but it'snot.
Just make it clear that it's only for portable hard drives. Eraser and similar programs don't work on flash drives due to wear leveling.
Sometimes, the impossible can become possible, if you're awesome!
And if you don't know what "wear leveling" is, it means you can't completely delete files on any flash memory-based media that uses the technique (all of them we know of at this point).
More info: http://en.wikipedia.org/wiki/Wear_leveling
Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
But, from what I understand, the constant shifting makes it bloody hard to recover the files anyway.
Or, Mr.Shotgun will make it really really hard
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
For example, why not just have a right-click menu option when you select a file or group of files in the recycle bin? The option can say "Delete with Eraser (not for Flash drives). You could even add an "are you sure?" popup.
The default would stay as a normal delete, but with a right-click, portable HD users could delete securely.
Never kiss your honey
when your nose is runny.
You may think it's funny,
but it'snot.
Im for keeping it simple. Having eraser separately is enough I think.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
No way. Eraser is staying separate. You have an older version of EraserPortable to choose from, or my program EDT (EraserDropTarget, linked in this thread somewhere). EDT was a huge undertaking, and I have no desire to remake it in this app, or integrate FlashBin into EDT.
EDT is a great program and it works like a charm. It doesn't get much simpler than dragging and dropping.
http://www.autohotkey.net/~FirstToyLab/project_iBin_documentation.htm
If you are interested in secure removal, check out EDT - https://portableapps.com/node/10984
I will not be integrating anything like this in FlashBin. If you're worried about securely erasing data, you should not be using the Recycle Bin anyway. EDT is a much better solution for you.
Ah, Alright!xD Thank You Very Much for making a "Recycle Bin Portable" program! *huggles*
Hnnn, I was looking for something like when a file from the removable drive is deleted (without manually running the Recycle Bin program), it will be detected then be moved to the Bin folder of the drive... something like that (can't elaborate details x~x;; sorry)... but I guess running first the program is inevitable for the "Recycle Bin, in a portable fashion" feature to work ^_^;;
Here's more features of the Recycle Bin that I'm thinking of:
>>Capability to undo delete (that actually kinda works like undo move, in the portable's case)
**Apparently, even though the file being deleted is not in the removable drive, Flash Bin doesn't include it in Windows' undo action.
>>Space Allocation (percent)
**Not necessarily a new partition for the bin, nor a preset occupied/allocated space in the drive. When the free space of the allocated bin space is not enough for the deleting file, the app deletes the "oldest-deleted file/s", if any. If the deleting file is too large for the allocated space... well... bypassing the bin would defeat the bin's purpose, so I hope the feature that I'll later mention is possible.
>>Deleted File Properties (Time/Date Deleted, Original Location)
**... o.o To me, that sounds like it needs its own explorer/file browser or something, to display those properties of the file... I'm also thinking, the app could have its own tab or a "Time/Date Deleted" and "Original Location" entries in the Properties dialogue box, that shows/applies only to files inside the bin directory.
And a feature I just thought of (not existing in Recycle Bin):
>>If a file is being copied/saved to the drive AND the drive is full, the app deletes "oldest-deleted file/s" in the bin big enough to give space to the file (if ever there are files in the bin).
**This is different from the Space Allocation feature I mentioned; this time, it deals with the free space and the size of all the deleted files. If ever this will be applied/possible, it will overwrite the Space Allocation feature then.
... If it's impractical to have such features, its alright not to include them ^_^ so as to not make the program complicated or what.
... Oh, and the icon! XD
I'm imagining something shaped like a thumb drive, with its body as its bin and its USB plug at the bottom... or, its USB plug serves as its bin. Both ideas, well, look like bloated thumb drives, kinda cylindrical-like but not exactly cylindrical, aheheh xD
Pardon the smilies ^_^;;
YYYYYYESSSS, a portable Recycle Bin is at my fingertips now! Thank You Very Much again!
I appreciate the enthusiasm! I'll respond best I can -
- Yes, there must be a program running to accomplish this type of action.
- Files not on the drive are recycled. If that action is not added to the windows undo action, then there's nothing I can do unfortunately. The undo history must be some action of the explorer shell, internal to Windows, and that's not something I can manipulate. I'll see if it's something I can reasonably implement internal to FlashBin.
- Both ideas regarding free space - don't forget, FlashBin only deals with files on your flash drive. So in essence you're just moving files around on the same drive. Your net free space doesn't change.
- Adding anything regarding properties to the explorer shell or the prop dialog would require a complicated shell extension (DLL) to be installed. That's a bit beyond my current C++ knowledge, and certainly wouldn't be portable. Outside that, FlashBin would require it's own interface to display files and information. That's out of FlashBin's design scope.
- I'm no graphic artist, but if you want to contribute an icon I'll certainly consider using it!
In Ccleaner Portable, in the options>include area, there is an area for including folders to be empted, (or wiped-Secure deletion, I have my version set to Gutmann 35 passes) Could the FLASHBIN folder in the FLASHBIN directory be included in the above Ccleaner location, letting Ccleaner erase the files in the FLASHBIN instead if just using the normal deletion? Or maybe something, where your Eraserportable could be initiated to wipe the folder?
Sure, you could use CCleaner or EDT to erase FlashBin's folder. It's not protected or anything. But search around this forum and read up on why secure deletion on a flash drive is useless and just kills your drive faster.
You should only use secure deletion tools on physical HDDs, not flash based media.
I'm using a portable HDD, but I never thought about the flash drive wear. Thanks for the heads up and thanks for your personal apps. They're great!
Yeah, wear leveling means that shredding is useless. When you try to overwrite something on flash media, the writes just get redirected to a different physical sector, defeating the purpose.
We should make a new topic for this because if you use a program like sdelete to wipe all the free space on a flash drive, it creates a file the size of the entire space available so there's no data to "wear level" since the whole drive is full. I'd like to discuss this further.
Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
Coool! This is excellent!!
I've been looking for something like this for ages! (the only thing I've found so far, was this http://www.portablefreeware.com/forums/viewtopic.php?t=3695, and it didn't work with me).
I have put the .exe and .ini files into the root directory of my USB stick and pointed the software to a Trashes root directory that I used to use for waste before I manually deleted it. (@ Bruce:) I also changed the hotkey to Ctrl-D (thanks for the tip!), so I can re-train myself to a new routine for deleting files, no matter which drive I'm working on.
Thanks for this useful software!!
i need to redirect it to the system recycle bin, how?
mmmmmmmmmm................
Took me a minute to figure out what you were asking. As far as I know, no, you cannot redirect a removeable media deletion event to another drive's recycle bin. The bins are drive specific.
Any chance of getting a FlashBin Drop Target? Also did you ever decide to make a ClamWin Drop Target? Did I mention I kinda like EDT?
I'm gonna try this out now. I just saw this, I've been offline for a long time.
My testing led me to find that you haven't taken into consideration files with the same name. FlashBin does a no questions overwrite.
This led me to an idea that would not only solve the same name problem but also help with restoring deleted files. When FB moves a file to the bin, it could append _time/date to the file name. I was thinking you might be able to append the path it was moved from to, but that could lead to some very long filenames.
What do you think of the idea?
As I understand it (which is a bit rough), the way the Recycle bin works to give move and rename each file to a unique name, then keep an index somewhere of what the old filename and path were. This would be great in FlashBin... except that, it would have to manage the folder, check for files deleted from its folder, etc... Adding a whole new level of complexity to the program...
I'd love it, though
You know, you could actually make a single droptarget for EDT and FB. Left drag and drop would send to FB, right drag and drop would send to EDT...
I'm glad you like the project (and EDT). I hadn't really considered a drop target, but it would be a nice addition. It would also allow the use of 3rd party file managers, since any FM that supports drag-and-drop must follow the OS specs for implementation.
You're right about duplicate file names. Since I haven't done anything regarding file restore, I never got this far. If I were to do it, I'd probably implement some kind of database where it would keep track of the real filename, and the real file would be renamed to a temp name to avoid collisions. I haven't decided whether I'm going to implement this either. In the absence of a restore feature, appending the current date/time would probably suffice.
I won't be combining this with EDT.
Anymore work done on this yet wraithdu?
I was thinking, if you do a drop target, you should make it so a leftclick on the target opens the bin folder.
How elaborate are you willing to go with FlashBin? I have a few other ideas as far as the drop target goes.
-overlay a file count of the bin folder. (Font face,size,color,and position saved in .ini by theme designer)
-different images for different states. (Empty,Used,Full) (The image displayed would change depending on the number of files in the bin folder. The number of files needed to trigger the Full image should be user selectable.)
I'm using an app called SkinTrash that works with the Windows Recycle Bin, it has these features. It is also portable as far as I can tell. I think these would be really great features for your portable bin also.
I haven't got around to doing anything else with this yet. It was never meant to be a big project, so probably the last feature I'll be adding is the file name tagging so similarly named files aren't overwritten when deleted.
I appreciate your enthusiasm, but I just don't have the time to devote to this project right now.
You're going to force me to learn auto-it aren't you? Of course I don't have time for that, so I guess this will stay as is for now.
A few things I'd like to see though...I'd like to see two new commands in the tray. The first is to empty the bin. The second is to open the bin. That way i don't have to hunt threw all those pesky folders :P.
Release Team Member
I'll add it to my mental to-do list.
Updated, see first post.
Please re-read the readme, as the underlying operation of FlashBin has changed.
Just curious, why the random string instead of time/date?
It seemed easier at the time, and filenames can't contain / or : so they'd have to be removed. The random string also makes sure the name doesn't already exist. There's a chance, using time / date, that files could use the same time / date since it would take less than a second to move a bunch of files. Using a millisecond timestamp is about as useful as a random string, so I just went with that.
download link doesn´t work
"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis .." Friday Next -
"May The Schwartz be with You!" Yogurt the Yoda
Sorry, sorry, fixed
Hey,
Congrats on the program, it is really great, but the only thing I don't understand yet is how to restore a file. I just got it 5 minutes ago, so maybe I will figure it out soon, but not as of yet. Help is greatly appreciated!
in a while, but if I recall correctly, the deleted files are saved within a folder inside of the Flashbin directory. You could look inside all of the folders contained within the Flashbin app directory and restore it from there.
Yes, manual restore at this point.
But the files in the Flashbin folder are in a weird format, how do you restore them to original format?
They are appended with random characters so that deleting more than one file of the same name won't overwrite the previous one. Just rename it to whatever it's supposed to be called.
Thank you, I was concerned about using it before, but now that I know how to restore it, I feel much safer deleting my files. Thanks for the help.
Are you going to continue to develop this app or leave it as is?
The two most important days of your life are the day you are born and the day you find out why.