boy15 Posted November 21, 2014 Share Posted November 21, 2014 (edited) Really I do not know macros for partitions of hard disk drive like c,d,e,f and g. Can some one edit my script to profesional easy script $path = "c:\Music folder" $path = "d:\Music folder" $path = "e:\Music folder" $path = "f:\Music folder" $path = "g:\Music folder" $path = "h:\Music folder" $path = "i:\Music folder" $path = "k:\Music folder" $path = "l:\Music folder" $path = "m:\Music folder" $path = "n:\Music folder" $path = "o:\Music folder" $exists = FileExists ($path) if $exists = 1 Then FileDelete($path) Else exit endif Edited November 21, 2014 by boy15 Link to comment Share on other sites More sharing options...
jguinch Posted November 21, 2014 Share Posted November 21, 2014 You should work with an Array, using DriveGetDrive(). Also, use DirRemove to remove a folder instead of FileDelete Local $sFolder = "Music Folder" Local $aLetters = DriveGetDrive("FIXED") For $i = 1 To $aLetters[0] If FileExists($aLetters[$i] & "\" & $sFolder) Then DirRemove($aLetters[$i] & "\" & $sFolder, 1) EndIf Next Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF 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