Difference between revisions of "Delete A File"
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 /> |
Revision as of 13:40, 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)
DECL/CHAR,200,filePath
filePath = ASSIGN/'D:\FileToDelete.txt'
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$Example 3
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
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'