|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
Error running VBScript (.VBS) File
I have a .VBS file that when run on my local machine, has no problems. Now that it has been moved to the production server, I get an error. The script takes all same files (first 6 characters of a file name) within a directory/sub directory structure and creates a batch file to combine these text files into one file.
vb Code:
it bombs out on line 127: For Each sFolder In Folder.SubFolders with the following error. Microsoft VBScript runtime error: Out of Memory: 'Folder.SubFolders'. Any clue as to what this can mean. Again, it runs fine on my machine, where it was written, but will not run on the production server. Thanks.
__________________
Come JOIN the party!!! Quote of the Month: Retirement: Because you've given so much of yourself to the company that you don't have anything left we can use. Questions to Ponder: What do you do when you see an endangered animal eating an endangered plant? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#2
|
||||
|
||||
|
Mehere--
Usually that is referring to an infinite loop somewhere? Since the code in the vbs script searches the list of parent sources until the end, there is a stack overflow (out of memory) which eventually occurs because there is no end. Just a hunch i guess....
__________________
I would rather know than not know at all... ![]() |
|
#3
|
||||
|
||||
|
i kinda went that way, but the directory it runs in has 7 subdirectories and no directories under those subs. when i ran it on my machine, i had 15 directories, with at least 2-3 subdirectories under each one of those and it runs with no problems. i'm stumped, to say the least.
|
|
#4
|
||||
|
||||
|
--moved to the brand new Windows Scripting forum.
![]() well, first of all I noticed the Archive and Combined are part of the main folder - it might be better idea to have them outside, for example: Code:
Const directory = "C:\Inetpub\wwwroot\test" Const archive = "C:\Inetpub\wwwroot\archive\" Const combined = "C:\Inetpub\wwwroot\combine\" if still no luck, Debug for the Rescue: Code:
Sub getSubFolders(Folder)
MsgBox("getSubFolders called for: " & Folder.Name)
For Each sFolder In Folder.SubFolders
...
it would at least verify whether it's infinite loop or not... |
|
#5
|
||||
|