I'm trying to get Wise Script to "Check if File exists": C:\Program Files\IBM\SDP80\lum\rad800_trial.dat
The file is there, I've copied/pasted the paths in notepad to compare them. Exactly the same. I've tried with full path, with and without quotes. I've tried using variable %PROGRAMFILES%\IBM\SDP80\lum\rad800_trial.dat, with and without quotes. I've tried using "Check if File or Directory exist". I'm also checking for %sys32%\cscript.exe file and that works fine.
Eventually I gave up on that and tried to use the "Search for File" statment and am not having success with that either.
Has anyone else had flakey problems with getting Wise Script to find a file that is actually there? Any ideas?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I figured it out. It was a Typo on my part. Never type, always copy/paste; your eyes can deceive you. Wise Script is not flakey.... I am. :)
I used this VBscript to check for the file and when that also failed to find it, then I knew it was not just a Wise Script issue.

Option Explicit
Dim path
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
path = "C:\Program Files\IBM\SPD80\lum\rad800_trial.dat"
If fso.FileExists(path) Then
msgbox ("You Found: " & path)
Wscript.Quit(9999)
Else
msgbox ("File: " & path & " does NOT exist!")
End if
Answered 08/17/2011 by: troy_in_wi
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity