wawo Posted May 9, 2007 Share Posted May 9, 2007 New to AutoIt; I am trying to delete old directories from backup automatically but when DirRemove runs, it says it deletes yet the directory on that drive disappears but the actual space on the drive remains the same!! Is this possible? FYI: there is NO recycle bin on this drive so there is nowhere to really empty. It is a Buffalo network drive with the recycle bin un-active. Any suggestions? (the send part is because it is writing on a notepad.exe doc) If FileExists($delfolder) Then ; MsgBox for testing only ;MsgBox(4096, "", "Folder exists.") ; Delete $days Day Old folder and all subdirs and files (folder name, yes remove subs and files init Send($days) Send(" day old folder named ") Send($sNewDate) Send(" has been DELETED") DirRemove($delfolder, 1) Else ;MsgBox(4096,"", "Folder does not exist.") Send("Folder not found, nothing deleted") Link to comment Share on other sites More sharing options...
CoderDunn Posted May 10, 2007 Share Posted May 10, 2007 (edited) You may have to run the disc defragmentator and/or disk clean up after deleting a directory to free the disk space. Right click the drive, then click properties. To run disk clean up, click the the button that says "Disk Cleanup" under the general tab. To run the defragmentator, select the tools tab and click "Defragment Now" It may take a while depending on the amount of junk and fragmented files on the drive. Hallman Edited May 10, 2007 by Hallman Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now