| Subject |
new file().Delete() does not delete file |
| From |
Heinz Kesting <NoSpam@For.Me> |
| Date |
Mon, 16 Jan 2023 14:20:35 +0100 |
| Newsgroups |
dbase.getting-started |
Hi all,
I am having trouble to delete a file. I tried both versions, DELETE FILE
and the file object's delete() method, but in some variations I get an
error, in other cases there is no error, but the file in question is not
deleted.
I am getting the filename with its full path from an image object, the
path is correct:
cFile = form.alb_nb.img_cover.datasource
form.alb_nb.img_cover.datasource = NULL // close file before trying to
delete it
? cFile // check the correct path and filename
new File().delete("cFile")
This produces no error, with or without quotes, while the path is shown
and is the correct one, but does not delete the file.
When I hard-code the path and filename, like
new
File().delete("D:\Daten\DataBases\Taurus\Alben\A_002030\Cover_from_BLOB.jpg")
it actually works. What am I doing wrong here, how can I use a variable
here?
Thanks for helping, Heinz
|
|