<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>28 Jul 2015 11:53:00 Z</lastBuildDate><pubDate>25 Jul 2015 14:55:00 Z</pubDate><description>Hi all,&#13;
&#13;
How can I close and delete/remove/destroy/kill/annihilate/obliterate/dispatch to bit heaven an idiotically stubborn text file, which cannot be closed?&#13;
&#13;
The case:&#13;
&#13;
I download two text files from a bank to the user's default download directory, then copy them to a work directory and then kill them from the download dir. So far so good. Then, in the work directory (not in any system directory):&#13;
&#13;
In Button1 I read the first file with fLoadtext and show it to the user in a window so that he can visually check it before proceeding. When the user closes the window, I returntocapture.&#13;
&#13;
In Button2 I open the same file, read it in a loop with fReadLine, manipulate its contents and write it to a HFSQL-file, and close it with fClose, or TRY to close it, in order to be able copy the original file to an archive directory and then delete it from the work directory.&#13;
THE PROBLEM: The file csnnot be closed, and therefore it cannot be deleted, because "it is being used by another process"!&#13;
&#13;
In Button3 I do an exactly similar operation with the second text file (only the files and fields are different): Open it, read it, write it to a HFSQL-file, close it, copy it to the archive dir and then delete it. This works as documented, no problems! Why does this work? Hint: this file has not been touched with the fLoadText command like the first one!&#13;
&#13;
Why can't I close and delete the first file? What's up? Who is using it? Nobody as far as I know! Unless it is PCSoft with its fLoadtext process!?!?!? Could fLoadtext leave the file open? I do not know its handle number so how can I close it? How can I force the closing of a file?&#13;
&#13;
Any hints/tips/instructions will be appreciated.&#13;
&#13;
Best regards&#13;
Ola</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file/read.awp</link><title>[WD19] How to close and delete a stubborn text file?</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53294/read.awp</comments><pubDate>28 Jul 2015 11:53:00 Z</pubDate><description>Finally found it.&#13;
It was my bad. I had opened the file for a second time in a sub process! I removed the other opening and now …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53294/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53294/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file/read.awp">[WD19] How to close and delete a stubborn text file?</source><title>Re: [WD19] How to close and delete a stubborn text file?</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53292/read.awp</comments><pubDate>28 Jul 2015 11:22:00 Z</pubDate><description>I checked and rechecked and tweaked the code and added error/success recording to the process.&#13;
&#13;
It seems now that the file can…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53292/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53292/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file/read.awp">[WD19] How to close and delete a stubborn text file?</source><title>Re: [WD19] How to close and delete a stubborn text file?</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53278/read.awp</comments><pubDate>25 Jul 2015 21:08:00 Z</pubDate><description>&lt;Result&gt; = fClose(&lt;File Identifier&gt;)&#13;
&#13;
What is the result when you try to fClose? Does it lie to you and say it is closed? If i…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53278/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53278/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file/read.awp">[WD19] How to close and delete a stubborn text file?</source><title>Re: [WD19] How to close and delete a stubborn text file?</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53277/read.awp</comments><pubDate>25 Jul 2015 20:51:00 Z</pubDate><description>Have you tired... ?&#13;
&#13;
hOpen(filename,foAutomaticDeletion)</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53277/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file-53277/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53263-wd19-how-close-and-delete-stubborn-text-file/read.awp">[WD19] How to close and delete a stubborn text file?</source><title>Re: [WD19] How to close and delete a stubborn text file?</title></item></channel></rss>
