The help file say that * can be used with DeleteFile>
I cant get it to work as i want to with a relative path.
Does NOT work:
DeleteFile>..\lock\DICOM*.lock
WORKS:
DeleteFile>C:\Program\MJT Net Ltd\lock\DICOM*.lock
DeleteFile>..\lock\DICOM_196605194353.lock
Help!
Thanks!
/tomas
Problem with DeleteFile> ,relative path and wildcard
Moderators: Dorian (MJT support), JRL
-
- Pro Scripter
- Posts: 149
- Joined: Tue Mar 23, 2004 9:11 pm
I agree that if you try to delete from a relative directory and you use an explicit file name, the file deletes correctly as in Captive's example. However, I agree with tomas that the files do not delete if a wildcard (*) is used
Here is a workaround if you have not already found one.
Here is a workaround if you have not already found one.
Code: Select all
Separate>%CWD%,\,dir
Sub>dir_count,1
Let>k=0
Let>newpath=
Repeat>k
add>k,1
let>value=dir_%k%
Concat>newpath,%value%\
Until>k=%dir_count%
DeleteFile>%newpath%DICOM*.lock