VBS_TIMEOUT ...again

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
BlackWisdom
Pro Scripter
Posts: 58
Joined: Thu Oct 16, 2003 12:53 am

VBS_TIMEOUT ...again

Post by BlackWisdom » Wed Feb 01, 2006 9:12 am

Hi Guys,

Of all the functions in Macro Scheduler I have challenges with this one the most. Sometimes it works and sometimes it simply does not. When I run the script below, it copies all the data and subfolders to the destination folder. The script works great. But if the CD has a lot of data I get the Script Control message. Once the function completes the control message goes away. So even when the error is generated the script still works. If the CD data is cached it only takes a couple of seconds and there is no error message. I have read several post (including my own) and Im not sure why its not working. Im running MSched 7.3.11 on w2k. Here is the script:




Let>VBS_TIMEOUT=10000
VBSTART
destfolder = "CDCount\"



Dim filesys, oFolder, srcfolder, tgtfolder, oFile, objFolder

Set fso = CreateObject("Scripting.FileSystemObject")




If fso.FileExists("C") Then
tgtfolder = "C:\"
End If




If fso.FileExists("D") Then
tgtfolder = "D:\"
End If




If fso.FileExists("E") Then
tgtfolder = "E:\"
End If




If fso.FileExists("F") Then
tgtfolder = "F:\"
End If




If fso.FileExists("G") Then
tgtfolder = "G:\"
End If




If fso.FileExists("H") Then
tgtfolder = "H:\"
End If




If fso.FileExists("I") Then
tgtfolder = "I:\"
End If




If fso.FileExists("J") Then
tgtfolder = "J:\"
End If




If fso.FileExists("K") Then
tgtfolder = "K:\"
End If




If fso.FileExists("L") Then
tgtfolder = "L:\"
End If




If fso.FileExists("M") Then
tgtfolder = "M:\"
End If




If fso.FileExists("N") Then
tgtfolder = "N:\"
End If




If fso.FileExists("O") Then
tgtfolder = "O:\"
End If




If fso.FileExists("P") Then
tgtfolder = "P:\"
End If




If fso.FileExists("Q") Then
tgtfolder = "Q:\"
End If




If fso.FileExists("R") Then
tgtfolder = "R:\"
End If




If fso.FileExists("S") Then
tgtfolder = "S:\"
End If




If fso.FileExists("T") Then
tgtfolder = "T:\"
End If




If fso.FileExists("U") Then
tgtfolder = "U:\"
End If




If fso.FileExists("V") Then
tgtfolder = "V:\"
End If




If fso.FileExists("W") Then
tgtfolder = "W:\"
End If




If fso.FileExists("X") Then
tgtfolder = "X:\"
End If




If fso.FileExists("Y") Then
tgtfolder = "Y:\"
End If




If fso.FileExists("Z") Then
tgtfolder = "Z:\"
End If








on Error Resume Next
fso.CopyFolder tgtfolder & "BackTemp\*.*", destfolder
VBEND
Exit


BlackWisdom
Pro Scripter
Posts: 58
Joined: Thu Oct 16, 2003 12:53 am

Post by BlackWisdom » Thu Feb 02, 2006 2:45 pm

6:46 AM 2/2/2006 - this issue has been solved

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Feb 02, 2006 2:46 pm

What was the problem?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

BlackWisdom
Pro Scripter
Posts: 58
Joined: Thu Oct 16, 2003 12:53 am

the problem was...

Post by BlackWisdom » Sun Feb 05, 2006 6:05 pm

Hi mtettmar

The problem was me writing code at 3 in the morning:

The help clearly states by default a VBScript never times out. I was trying to set a time out based on the size of CD data. and getting frustrated when the time out was not long enough.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts