Maximum file size or entries to append to a file with VBScript?

Can't find here and Mr. Google doesn't respond either, so sorry if this has been answered; it seems pretty basic.

I have a VBScript that is appending to a file to create a log of PDFs being processed by an OCR system.  Ran fine for a couple of days, now I get a "Permission denied" error when I hit the "OpenTextFile" instruction.  The file has about 24K lines, and is just under 1MB in size.  The same script is running on another machine without error, but has 22K lines and is about 800K in size.  So, is there a file size or number of records maximum problem?  If so, is there a different way to open the file?

I need the log to run for several days as I look for an unrelated system problem.  The contents of the file will be copied into a spreadsheet as CSV data for analysis.
LVL 1
Mike CaldwellConsultant to IP industryAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Is the file getting locked in an open process somewhere else, or maybe your script is not closing it.
As you are able to write to the file normally then Permission Denied indicates it is locked.
0
Mike CaldwellConsultant to IP industryAuthor Commented:
I kill all of the VBScripts I have running, then try to run this one.  It does not create the file, I created it a few days ago, empty.  So it ran for a couple of days, thus the 24K records and 1MB file size.  I copied the file off, and started over with an empty file, and it is running and appending just fine.
0
GaryCommented:
Confused by what you are saying
What type of file is it - not that it should matter.
0
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Bill PrewCommented:
Size isn't your problem, either you didn't have permissions to the file, or the file was in use by another process.

~bp
0
COACHMAN99Commented:
If you edit the file and reduce its size (to below 20k records) does the problem go away?
Are you able to edit/save it with a different editor?
0
Mike CaldwellConsultant to IP industryAuthor Commented:
.TXT file.  If it were in use by another process I wouldn't have the problem after a reset.  When I deleted all the records the problem went away.
0
GaryCommented:
Don't know then, can you post your code?
Not clear from your comments but where you able to open the file manually?
0
Mike CaldwellConsultant to IP industryAuthor Commented:
I could open the file, but I could not save it.  Let me look at posting a subset of the code; some of it is confidential to a client.
0
GaryCommented:
Everything is saying the file is locked for editing, which makes me suspect your code is responsible.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GaryCommented:
So the problem was?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.