1 Replies - 934 Views - Last Post: 10 June 2014 - 07:08 AM Rate Topic: -----

#1 ApprenticeAlexH  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 10-June 14

Error 800A004C

Posted 10 June 2014 - 06:59 AM

I'm getting this error when running my script.

Script: C:\Scripting\ReportsCLUC.vbs
Line: 4
Char: 1
Error: File Path not found
Code: 800A004C
Source: Miscrosoft VBScript runtime error

(before you ask, there are no spelling mistakes.

Below is my code
____________________________________________

dim fso, folder, files, contents, tempFO, index

set fso = CreateObject("Scripting.FileSystemObject")
set folder = fso.GetFolder("C:\Scripting\HBIS.txt")
set files = folder.Files

For Each file in files
set tempFO = fso.OpenTextFile(file, 1)
contents = tempFO.ReadAll()
tempFO.Close()
index = instr(contents, REPORTS=CLUC)

If index > 0 Then
set tempFO = fso.OpenTextFile(file, 2)
tempFO.Write(Mid(contents, index))
tempFO.Close()
End If
Next
______________________________________________________

Is This A Good Question/Topic? 0
  • +

Replies To: Error 800A004C

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3358
  • View blog
  • Posts: 11,372
  • Joined: 12-December 12

Re: Error 800A004C

Posted 10 June 2014 - 07:08 AM

Quote

Script: C:\Scripting\ReportsCLUC.vbs
Line: 4
Char: 1
Error: File Path not found

The error message is very clear.
set folder = fso.GetFolder("C:\Scripting\HBIS.txt")

You are using GetFolder but attempting to get a file.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1