Welcome Guest.   Make a donation to an author on the site October 23, 2014, 10:51:49 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the Practical Guide to DonationCoder.com Forum Search Features
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: File/Folder Deleter Based on Text File  (Read 8343 times)
dojima
Participant
*
Posts: 6

View Profile Give some DonationCredits to this forum member
« on: October 02, 2009, 06:49:41 AM »

I've been looking for a program that can do this for a few hours with no luck.  I would think it's something that's very easy to do, but then again, I'm not a programmer.

As the subject states, I'm wondering if it's possible to create a program that will delete files and folders based on a text file with their full paths given, delimited by line breaks.  For example, a txt file with the following,

c:\folder to be deleted
e:\folder\file to be deleted.jpg

would delete those two items when chosen by the program.  Perhaps a good way to handle this is to be able to open or drag the txt file to the program window and have it show the list of items to be deleted before clicking a button to carry out the action.  Alternatively, pasting the list directly from the clipboard might be useful.  By deletion, I simply mean the action of moving the files/folders listed to the recycle bin.

Upon completion of the recycling task, I envision a status window popping up that says something like, "x files deleted and y files skipped." in the event that certain files on the list were either in use or simply do not exist.  Altering the original list of items from black to green or red based on recycled or skipped status respectively might be a good way to show this visually, though I don't know how overly difficult I may be making the coding of the program by requesting this.  Additionally, it might be useful to have the option of specifying other delimiters such as colons, vertical bars, etc.

Thanks.
« Last Edit: October 02, 2009, 06:52:56 AM by dojima » Logged
skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: October 02, 2009, 07:39:09 AM »

I can do this one.
Logged

skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: October 02, 2009, 08:25:49 AM »

As the subject states, I'm wondering if it's possible to create a program that will delete files and folders based on a text file with their full paths given, delimited by line breaks.

Yes, easily done.

Perhaps a good way to handle this is to be able to open or drag the txt file to the program window

Almost all of my apps offer several ways when dealing with this type of functionality.  1) File menu 2) Toolbar buttons 3) Drag & drop

and have it show the list of items to be deleted before clicking a button to carry out the action.

Correct, this will be a listview-centric app.

Alternatively, pasting the list directly from the clipboard might be useful.

Can do.

By deletion, I simply mean the action of moving the files/folders listed to the recycle bin.

Deleting to the bin is doable.

Upon completion of the recycling task, I envision a status window popping up that says something like, "x files deleted and y files skipped." in the event that certain files on the list were either in use or simply do not exist.

How about displaying this information in the app's statusbar?

Altering the original list of items from black to green or red based on recycled or skipped status respectively might be a good way to show this visually, though I don't know how overly difficult I may be making the coding of the program by requesting this.

I was thinking of using coloured icons in the first column to show the status of a certain line.  Logic would be something like this:

On file/folder load action:

Grey icon - File or folder is present.
Yellow icon - File or folder is missing.

On file/folder delete action:

Green icon - Deletion was successful.
Red icon - Deletion was unsuccessful.

Additionally, it might be useful to have the option of specifying other delimiters such as colons, vertical bars, etc.

Can do but this will come last.

Your thoughts?
Logged

dojima
Participant
*
Posts: 6

View Profile Give some DonationCredits to this forum member
« Reply #3 on: October 02, 2009, 08:49:31 AM »

Sounds perfect.  Additional delimiters wouldn't be useful for me at all; I just threw that in on the off chance it might be useful to others who could use a program like this.

Thanks a bunch.
Logged
skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: October 02, 2009, 09:06:23 AM »

Cool.  I wanted to make sure that using coloured icons versus coloured text was okay.  I can do either, but I prefer icons.  I've got some shopping to do with my wife so I'll get started on this a bit later.
Logged

dojima
Participant
*
Posts: 6

View Profile Give some DonationCredits to this forum member
« Reply #5 on: October 02, 2009, 09:25:23 AM »

Yeah, the icons would probably be more visible.  Thanks again.
Logged
skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: October 02, 2009, 02:50:17 PM »

Almost done and need an app name.  I have Deletext as the working name but, as always, am open to suggestion.  Cranioscopical?!?!  Pressure's on, guv.   cheesy
Logged

cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,182



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: October 02, 2009, 03:08:12 PM »

I think DeleText is spot on!
An alternative might be Deletist.
Logged

Chris
skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: October 02, 2009, 03:10:28 PM »

I like Deletist.  Thanks.  =] Now to choose an icon, tidy up some loose ends and this puppy is ready for release.
Logged

skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: October 02, 2009, 04:52:13 PM »

Give this a try:  Deletist v1.0.0

Website | Download

Logged

dojima
Participant
*
Posts: 6

View Profile Give some DonationCredits to this forum member
« Reply #10 on: October 02, 2009, 06:48:57 PM »

hahah, that's too awesome.  Makes me wish I could program.  Seems to work perfectly.  I do have two questions, though.  Is the list limited to a certain number of items?  Also, I don't seem to be able to paste a list of items in there.  I'm not sure if I might just be doing something wrong or it hasn't been implemented.

Thanks again.  Amazing work.
Logged
skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #11 on: October 02, 2009, 06:51:23 PM »

Is the list limited to a certain number of items?

No limit.

Also, I don't seem to be able to paste a list of items in there.  I'm not sure if I might just be doing something wrong or it hasn't been implemented.

Ah, crap.  I forgot.  Give me a few minutes.

Thanks again.  Amazing work.

You're welcome.  Glad to help.
Logged

skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: October 02, 2009, 07:05:29 PM »

v1.0.1 - 2009-10-02
    + Added ability to paste in paths from clipboard via the Edit menu or via Ctrl+V.  (Thanks, dojima)

Website | Download

Sorry about that.
« Last Edit: October 02, 2009, 07:07:07 PM by skwire » Logged

dojima
Participant
*
Posts: 6

View Profile Give some DonationCredits to this forum member
« Reply #13 on: October 02, 2009, 07:21:31 PM »

Flawless.  Thanks.  Anywhere I can donate?
Logged
skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: October 02, 2009, 10:23:30 PM »

v1.0.2 - 2009-10-02
    ! Removed tray icon that was erroneously left in.

Website | Download
Logged

dojima
Participant
*
Posts: 6

View Profile Give some DonationCredits to this forum member
« Reply #15 on: October 03, 2009, 01:59:39 AM »

haha, yeah I was wondering what those options were when I right-clicked it.
Logged
paarkhi
Supporting Member
**
Posts: 87


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #16 on: October 03, 2009, 06:42:49 AM »

Thanks Sir, you are back with again with one more nice code.
Logged
skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #17 on: October 03, 2009, 08:26:50 AM »

Thanks, paarkhi.   smiley

v1.0.3 - 2009-10-03
    + Added a 'Remove "missing" rows' button on the toolbar.  This will remove any rows from the list that report as "File/folder missing."

Website | Download

Logged

sajman99
Supporting Member
**
Posts: 663


View Profile Give some DonationCredits to this forum member
« Reply #18 on: August 04, 2010, 07:04:41 PM »

Deletist is mentioned today at ghacks.net so I had to come check it out.  http://www.ghacks.net/201...delete-folders-and-files/

Looks like a useful cleanup tool--thanks skwire for the cool app. Cool
Logged
skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: August 04, 2010, 11:54:54 PM »

You're welcome.  Happy to help.   cheesy
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.038s | Server load: 0.06 ]