remove File from Folder

cure
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
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
0
Comments
-
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+erase0 -
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 Again0 -
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.0 -
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
curdin0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions