Unreliable File Deletion
preid at reidit.co.uk
preid at reidit.co.uk
Sat Mar 27 14:12:28 EDT 2021
Hi
Has anyone had problems with file deletion by LC under Windows 10?
According to the docs the following commands should delete a file:
delete file pathname
open file pathname for write
Also the shell() command sequence:
put UnixToWinPath(pFile) into pWinFile
put "del " & quote & pWinFile & quote into tCmd
set the hideConsoleWindows to true
put shell(tCmd) into tRes
With various versions of LC including the latest 9.6.2 RC3 I get the following behaviour:
1. The file is deleted correctly.
2. The file appears to be deleted but any new version written to the same folder is actually the old version.
3. The deletion fails with a failure comment returned in the Result.
4. The deletion seems to work but the next attempt to save a file of the same name fails, reported by the Result.
I'm getting this problem when tested on a brand new up-to-date virtual Windows 10 Home 64-bit and a similar PC laptop. It's not a problem on the Mac.
Any ideas please?
Thanks
Peter
--
Peter Reid
Loughborough, UK
More information about the use-livecode
mailing list