remove File from Folder

curecure Member Posts: 77
Hi

How can I remove (delete) more then one file from a folder? I don't know the name of the files. I have to delete all the files in this folder.

Thx for your answers

regards, curdin

Comments

  • ArhontisArhontis Member Posts: 667
    Hello,

    Try searching for file and erase and you will find a lot of posts regarding files and erasing...

    An example:
    http://www.mibuso.com/forum/viewtopic.p ... file+erase
  • curecure Member Posts: 77
    every thing works fine. but when I try to delete the files, I get a strange message from the system:

    "The File Table is read-only"

    But I've the permission to delete the files, when I go directly with Exporer. Do I have to setup up a permission?

    Thx Again
  • ArhontisArhontis Member Posts: 667
    Use the ERASE function. Part from the C/SIDE help follows:
    ERASE (File)
    Use this function to erase a file.

    [Ok] := File.ERASE(Name)
    Ok

    Data type: boolean

    This optional return value tells you whether or not the system erased the file.

    Ok will be...
    If the system...

    TRUE Erased the file
    FALSE Did not erase the file

    Name

    Data type: text or code

    The name of the file you want to erase, including the path. When you enter the path, keep in mind these shortcuts

    You can...
    If the file is located...

    Omit the drive designation On the current drive
    Omit the full path In the current directory
    Enter only the subdirectory name In a subdirectory of the current directory

    Comments
    If you do not use the return value, and the file cannot be erased (for any reason at all), a run-time error will occur. If you do include the return value in your code, you are supposed to handle any errors yourself.
  • curecure Member Posts: 77
    hey Arhontis
    thank you very much for your help - now it's realy working. =D> The problem was, that i tried to use file.DELETE! But with the ERASE Function it works.

    so have a nice evening

    curdin
    :lol:
Sign In or Register to comment.