Welcome Guest.   Make a donation to an author on the site April 24, 2014, 10:04:25 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.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Remove folder  (Read 2896 times)
kartal
Supporting Member
**
Posts: 1,529


View Profile Give some DonationCredits to this forum member
« on: June 16, 2009, 02:17:19 AM »

Hi

This tiny Python script utility is using Gnu rm.exe to forcefully and peacefully removes folders. I think it works better than windows delete. It will popup a window where you put the path to intended delete folder. For now it does only one folder(recursively) at a time. I made this utility because I was sick of waiting for Window`s delete to figure out what to delete.

http://shup.com/Shup/173115/FolderRemove.zip

Use it on your own risk. I use it here happily smiley
« Last Edit: June 16, 2009, 09:52:20 PM by kartal » Logged
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: June 16, 2009, 07:43:51 AM »

Why depend on an external tool instead of coding the removal routine in Python? And when using an external tool, why depend on gnu rm instead of Windows' built-in RMDIR /S ?
Logged

- carpe noctem
kartal
Supporting Member
**
Posts: 1,529


View Profile Give some DonationCredits to this forum member
« Reply #2 on: June 16, 2009, 09:51:18 AM »

Why depend on an external tool instead of coding the removal routine in Python? And when using an external tool, why depend on gnu rm instead of Windows' built-in RMDIR /S ?

Well because it was easier to just use Gnu tool rather than trying to write my own recursive Python folder deletetion. I was just trying to get something going asap.

I just like the Gnu rm`s options and I use other Gnu Core Utils here as well, so it was just a personal taste.

I will just make one version with RMDIR instead later today.


Logged
kartal
Supporting Member
**
Posts: 1,529


View Profile Give some DonationCredits to this forum member
« Reply #3 on: June 16, 2009, 01:16:05 PM »

I just tried using "rmdir" inside my script, I could not get it to work. I think it is because Popen does not pass rmdir as a command. Since I do not use it myself I wont dwell around it much really.



edit: I fixed the issue, it was a shell issue. Here is the windows version but it does not have any verbose mode.

http://shup.com/Shup/172957/FolderRemove_windows.zip
« Last Edit: June 16, 2009, 01:28:08 PM by kartal » 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.022s | Server load: 0.02 ]