Filesystem-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Filesystem-Commands >

Filesystem-Commands

RMD. -  Remove-Directory

Previous Top Next


MiniRobotLanguage (MRL)

 

RMD. Command

ReMove Directory

 

NTFS-Direct

 

Intention

 

This command is used to delete a folder and all of its contents.

This command will override software write protection.

Use with extreme caution.

You have to specify the clear path without wildcards.

This was done intentionally to prevent the deletion of unwanted content.

 

Usage is:

 

RMD.(dir to remove)

 

In case there are write-protected files and dirs in there and you want to kill'em all, choose the "force flag":

RMD.(dir to remove)|1

 

Finally you can specify a variable that will receive a 0 or a 1 if the folder could be removed or not.

 

RMD.(dir to remove)|$$RES

MBX.$$RES

 

If you want to debug your Script safely, you can use the

 

OPT.SAFEFILE|1

 

this will bring up such a Messagebox for destructive File-Operations like DEL., RMD. REN. and DCP.

 

2015-01-22 14_58_00-Safety-Warning _ SPR-Script

 

You can choose between

 

- "Yes"  - this will start the requested file-operation

- "No"  - this will prevent the requested file-operation and set the Timeout-Flag

- "Cancel"  - this will prevent the requested file-operation and set the Timeout-Flag and end the script.

 

 

  Please note that the Explorer and Anti-Virus Tools may lock files and folders and prevent
  the RMD.-Command from working as expected. In this case the Command will not delete the folder completely and the Timeout-Flag will be set.

 

 

Syntax

 

 

RMD.P1[|P2]

 

 

Parameter Explanation

 

P1 - Filename to delete

P2 - opt. Variable for result (1/0)

 

 

 

 

Example

 

'*****************************************************

' EXAMPLE 1: RMD.

'*****************************************************

'DBM.2

VAR.§§FIL=?desktop\Kopie von Joomla_1.7-Stable-Full_Package

RMD.§§FIL|§§RES

PRT.§§RES -> success?

END.

 

 

 

 

Remarks

 

This command is somehow a "DELTREE" command, it can potentially delete your whole harddisk, be careful and use on your own risk!

 

   Please note that the Explorer and Anti-Virus Tools may lock files and folders and prevent
   the RMD.-Command from working as expected. In this case the Command will not delete the folder completely and the Timeout-Flag will be set.

 

 

Limitations:

 

Has not been tested with asian- or unicode file-systems.

 

 

See also:

 

    DEL. - Delete File

    ATF - Append-to-File

    CFF. - Copy-From-File

    CTF - Copy-To-File

    COP. - Copy File

    SHF. - Shell-File-Operation

    MDF. - Make-Direktory-File

    MKD. - Make-Directory

    GLC. - Get-Line-Count

    IEF. / NEF. - If - exist - File

    LFF - Line-From-File

    WFF. - Wait-For-File

    REN. - Rename File/Dir

    OPT. - Optional Settings