Jump to content

patitions of harddisk drive


boy15
 Share

Recommended Posts

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
Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...