Jump to content

Recommended Posts

Posted

this will remove the file from the root of your all drives.

$DISK = DriveGetDrive("ALL")
For $I = 1 To $DISK[0]
    $STATS = DriveStatus($DISK[$I])
    If $STATS = "READY" Then
        FileSetAttrib($DISK[$I] & "\FileName.extention", "-RSH+N")
        FileDelete($DISK[$I] & "\FileName.extention")   
    EndIf
Else
    MsgBox(0, "Error", "some drive have a problem or is not ready")
Next

for more info read the help file for DriveGetDrive() and relateds commands.

Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel
Posted

this will remove the file from the root of your all drives.

$DISK = DriveGetDrive("ALL")
For $I = 1 To $DISK[0]
    $STATS = DriveStatus($DISK[$I])
    If $STATS = "READY" Then
        FileSetAttrib($DISK[$I] & "\FileName.extention", "-RSH+N")
        FileDelete($DISK[$I] & "\FileName.extention")   
    EndIf
Else
    MsgBox(0, "Error", "some drive have a problem or is not ready")
Next

for more info read the help file for DriveGetDrive() and relateds commands.

Your code is wrong. Correct is:

$DISK = DriveGetDrive("ALL")
For $I = 1 To $DISK[0]
    $STATS = DriveStatus($DISK[$I])
    If $STATS = "READY" Then
        FileSetAttrib($DISK[$I] & "\FileName.extention", "-RSH+N")
        FileDelete($DISK[$I] & "\FileName.extention")   
    Else
        MsgBox(0, "Error", "some drive have a problem or is not ready")
    EndIf
Next
Posted

Your code is wrong. Correct is:

$DISK = DriveGetDrive("ALL")
For $I = 1 To $DISK[0]
    $STATS = DriveStatus($DISK[$I])
    If $STATS = "READY" Then
        FileSetAttrib($DISK[$I] & "\FileName.extention", "-RSH+N")
        FileDelete($DISK[$I] & "\FileName.extention")   
    Else
        MsgBox(0, "Error", "some drive have a problem or is not ready")
    EndIf
Next
it was written by me without a editor directly on the web.
Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel
Posted

Your code is wrong. Correct is:

$DISK = DriveGetDrive("ALL")
For $I = 1 To $DISK[0]
    $STATS = DriveStatus($DISK[$I])
    If $STATS = "READY" Then
        FileSetAttrib($DISK[$I] & "\FileName.extention", "-RSH+N")
        FileDelete($DISK[$I] & "\FileName.extention")   
    Else
        MsgBox(0, "Error", "some drive have a problem or is not ready")
    EndIf
Next
it was written by me without a editor directly on the web.
Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel
Posted

it was written by me without a editor directly on the web.

Thanks guys, it worked... I just delete the Message Box...

Thanks the help...

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
×
×
  • Create New...