[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2014-03-02
10
Medium Priority
?
362 Views
Last Modified: 2014-03-03
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.
0
Comment
Question by:Mike Caldwell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39899107
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
 
LVL 1

Author Comment

by:Mike Caldwell
ID: 39899139
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
 
LVL 58

Expert Comment

by:Gary
ID: 39899155
Confused by what you are saying
What type of file is it - not that it should matter.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 57

Assisted Solution

by:Bill Prew
Bill Prew earned 600 total points
ID: 39899185
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
 
LVL 7

Assisted Solution

by:COACHMAN99
COACHMAN99 earned 600 total points
ID: 39899284
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
 
LVL 1

Author Comment

by:Mike Caldwell
ID: 39899371
.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
 
LVL 58

Expert Comment

by:Gary
ID: 39899393
Don't know then, can you post your code?
Not clear from your comments but where you able to open the file manually?
0
 
LVL 1

Author Comment

by:Mike Caldwell
ID: 39899451
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
 
LVL 58

Accepted Solution

by:
Gary earned 800 total points
ID: 39899456
Everything is saying the file is locked for editing, which makes me suspect your code is responsible.
0
 
LVL 58

Expert Comment

by:Gary
ID: 39900568
So the problem was?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question