Difference between revisions of "Delete A File"
(One intermediate revision by the same user not shown) | |||
Line 14: | Line 14: | ||
CLOSE/DID(READFILE),DELETE<br /> | CLOSE/DID(READFILE),DELETE<br /> | ||
<br /> | <br /> | ||
− | CALL/EXTERN,DME,'FILESYSTEM','REMOVE',CONCAT(fileName,'')<br /> | + | CALL/EXTERN,DME,'FILESYSTEM','REMOVE',CONCAT(fileName,<nowiki>''</nowiki>)<br /> |
<br /> | <br /> | ||
<span style="color: green; text-decoration: none;">$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span><br /> | <span style="color: green; text-decoration: none;">$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span><br /> | ||
Line 28: | Line 28: | ||
<br /> | <br /> | ||
CALL/EXTERN,DME,'FILE_SYSTEM','REMOVE',CONCAT(fileName)<br /> | CALL/EXTERN,DME,'FILE_SYSTEM','REMOVE',CONCAT(fileName)<br /> | ||
− | |||
− | |||
<br /> | <br /> | ||
<span style="color: green; text-decoration: none;">$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span><br /> | <span style="color: green; text-decoration: none;">$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span><br /> | ||
<span style="color: green; text-decoration: none;">$$Example 3</span><br /> | <span style="color: green; text-decoration: none;">$$Example 3</span><br /> | ||
<span style="color: green; text-decoration: none;">$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span><br /> | <span style="color: green; text-decoration: none;">$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span><br /> | ||
+ | DECL/CHAR,200,filePath<br /> | ||
+ | filePath = ASSIGN/'D:\FileToDelete.txt'<br /> | ||
+ | <br /> | ||
DID(READFILE)=DEVICE/STOR,filePath<br /> | DID(READFILE)=DEVICE/STOR,filePath<br /> | ||
OPEN/DID(READFILE),DIRECT,OUTPUT,OVERWR<br /> | OPEN/DID(READFILE),DIRECT,OUTPUT,OVERWR<br /> |
Latest revision as of 13:41, 10 December 2018
The ability of deleting a file is achieved using a non-Dmis statement.
Since there is no user interface to add it, the code shall be type manually using the following syntax:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$Example 1
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
DECL/CHAR,200,filePath
filePath = ASSIGN/'D:\FileToDelete.txt'
DID(READFILE)=DEVICE/STOR,filePath
OPEN/DID(READFILE),DIRECT,OUTPUT,OVERWR
WRITE/DID(READFILE),'Test String'
CLOSE/DID(READFILE),DELETE
CALL/EXTERN,DME,'FILESYSTEM','REMOVE',CONCAT(fileName,'')
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$Example 2
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
DECL/CHAR,200,filePath
filePath = ASSIGN/'D:\FileToDelete.txt'
DID(READFILE)=DEVICE/STOR,filePath
OPEN/DID(READFILE),DIRECT,OUTPUT,OVERWR
WRITE/DID(READFILE),'Test String'
CLOSE/DID(READFILE),DELETE
CALL/EXTERN,DME,'FILE_SYSTEM','REMOVE',CONCAT(fileName)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$Example 3
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
DECL/CHAR,200,filePath
filePath = ASSIGN/'D:\FileToDelete.txt'
DID(READFILE)=DEVICE/STOR,filePath
OPEN/DID(READFILE),DIRECT,OUTPUT,OVERWR
WRITE/DID(READFILE),'Test String'
CLOSE/DID(READFILE),DELETE
CALL/EXTERN,DME,'FILE_SYSTEM','REMOVE','D:\FileToDelete.txt'