Error Message running VB script in Windows 2008 Server

60 pts.
Tags:
VB script
Windows Server 2008
I run a simple vb script to copy files from one direectory to another. I get an error back saying that the path can't be found. I run it like this: C:> cscript mycopy.vbs I get back an error that says the path is invalid and shows something like this: C:mycopy.vbs(4,1) could not be found Where is the (4,1) coming from and is this what is preventing the file from being found by Microsoft?

Answer Wiki

Thanks. We'll let you know when a new response is added.

<i>I think</i> the script file (mycopy.vbs) is in fact being found, but it is generating an error when executed, and the error is being generated by line 4 of your script code (that is what the (4,1) part means).

———————–

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Grabber
    That would be correct if it also gave me an error in Windows 2003 but it doesn't . Here is the script Set objFS = CreateObject("Scripting.FileSystemObject") strFolder = "c:Transcriptsdocfiles" strDestination = "c:docs" Set objFolder = objFS.GetFolder(strFolder) Go(objFolder) Sub Go(objDIR) If objDIR <> "System Volume Information" Then For Each eFolder in objDIR.SubFolders Go eFolder Next For Each strFile In objDIR.Files strFileName = strFile.Name strExtension = objFS.GetExtensionName(strFile) If strExtension = "doc" Then objFS.CopyFile strFile , strDestination & strFileName End If Next End If End Sub
    60 pointsBadges:
    report
  • carlosdl
    Grabber, it has nothing to do with the operating systems. It gives you an error in 2008 because it is another machine, and it does not necessarily have the same directory structure and access permissions. Are you sure the "c:\Transcriptsdocfiles" directory exists in the 2008 server and that you have access permissions on it ? You might want to make some tests changing the code of your script, to see what you get back when the script has errors (and to confirm that the script is actually being executed).
    69,065 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following