Jump to content
Macro Express Forums

After Appending A Txt File, The Text File Locks


Markter

Recommended Posts

I have a macro that appends to a txt file multiple times. Every once in awhile that txt file locks up and the macro aborts when it trys to append. The only way I can free up that file again is to shut down my PC. Has anybody run into this problem? Any idea why the file is locking up? Any help is greatly appreciated.

Thanks!

Mark

Link to comment
Share on other sites

It's probably Windows locking the file. You may be writing to it too many times, or trying to append too fast within a short period.

 

I'd suggest reducing your "Append to Text File" commands. Instead of writing to file every single time, you could append data to a variable first (Append Text String Variable), then later write it to file after say, 10 lines.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...