Jump to content

Recommended Posts

TheSaint

Just a little program I whipped up a few days ago, that I thought some might appreciate.

It uses hash checking to match source with destination, and if equal, deletes the source.

It is pretty basic code, but does some nice tricky things ... including working by drag & drop for source and destination.

NOTE - Source and Destination paths are never the same. The source file or folder must exist in the Destination folder.

Essentially, I use this to clear folders on my transfer thumb drive ... thus making sure I have indeed backed up all. In reality, just a form of double-checking, because I do a lot of transfers between Netbook and Laptop and eventually external HDDs, using a thumb drive as the transfer medium ... between the PCs anyway. I keep multiple copies of everything ... and yes, even online (Google Drive) for smaller size content.

Hopefully its basic usage should be self evident. Enjoy!

WARNING - The process is an immediate one, when source is dragged & dropped on that input (providing Destination has already been set). There are no prompts.

DeleteIf Same v1.1.zip  (includes source, but not the icon which I got for myself as an online freebie)

DeleteIf Same v1.2.zip  (includes source) update detail at Post #4

DeleteIf Same v1.3.zip (includes source) update detail at Post #5

DeleteIf_main.png.982276deab8959cee6947c78239e96fa.png   DeleteIf_dropbox.png.106ead5a7f85e018013c2a398b3c46ee.png

Older Screenshots

Spoiler

DeleteIf.pngDeleteIf_1-2.png

P.S. I have belatedly realized (as is often the case) that I should have labelled the first input as, Destination Path To Compare Inside, and other as, Source To Delete If A Match Within Destination. Oh well, just a slight amendment to each, but does make things clearer.

Edited by TheSaint
  • Like 4

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
TheSaint

After just using the program again this arvo, it has occurred to me, that a check & delete an empty folder option would be a great addition ... I am always making sure a folder is really empty before deleting it ... so drag & drop simplicity would be cool.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
Earthshine

Check out google DiffMatchPatch if you ever need to sync text

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
TheSaint

DeleteIf Same has been updated to v1.2. See first post,, which includes latest screenshot.

(v1.2) Added options for 'Deleting an empty folder' and 'Report only', plus relocated the 'Remove the Thumbs.db files' to a checkbox option (rather than a dialog OK button toggle). After a source has been deleted its path now gets greyed out in the source input. Renamed 'Destination' and 'Source' input titles, plus modified the greyed out advice text shown in each input. An error is now reported when a file is dropped on the Destination input field. Major rewrite of checking & deleting code to accommodate new features. Log entries are now added to start of Log file, not end.

NOTES - With this new version, and the 'Report only' option, you can now use the program as a comparison tool only (no delete). However it only advises if a match or not. Three checks are involved - (1) Folder or File existence in destination folder. (2) Folder & File list  (including all sub-folders & content) and layout. (3) Hash check using that facility in AutoIt's Crypt.au3 (Crypt Management UDF).

An empty folder also applies when containing empty sub-folders. So long as no files exist within the hierarchy, then the parent folder is deemed empty.

TOP

Edited by TheSaint
  • Like 1

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
TheSaint

DeleteIf Same has been updated to v1.3. See first post,, which includes new screenshots.

(v1.3)
Removed the 'Minimize' button, and made the GUI a normal one with System menu and Minimize, then added a 'Batch List' dropbox button and process.
Logfile now also gets a source path entry before checking starts, so that time taken can be determined later, if desired.

NOTE - Many times I had been wishing the program had a batch mode, and finally I made it so. This is particularly handy when wanting to delete more than one large file or folder, as it means you can set and forget. I've yet to test the 'ESC' to cancel option in Batch List mode, which uses Adlib and gets polled every 1500 millisecs.

  • Thanks 1

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

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

×