Sign in to follow this  
Followers 0
boy15

patitions of harddisk drive

2 posts in this topic

#1 ·  Posted (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 by boy15

Share this post


Link to post
Share on other sites



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

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
Sign in to follow this  
Followers 0