Jump to content

jeftiii

Members
  • Posts

    2
  • Joined

  • Last visited

jeftiii's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Fixed! The file actually wasnt .txt but .log. Due to same icon i wasnt aware of it.
  2. Hi all, im new to this forum. Just started programming with VBS, at the real beginner level. Im running into some difficulty and Google nor any forum could give me the anwser, so im gonna give it a try here. I've got the following code which is giving diffuculties. Const ForReading = 1 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile(doel, ForReading) sRead = objTextFile.Read(2)The third line ("doel" is a variable which contains the path to a file) gives an error File not found (800A0035). I use a msgbox to check whether the path is correct, which it is. I've tried adding True right behind ForReading, which creates a file with exactly the same name as the file im trying to read, in exactly the same folder. This makes me wonder if it has anything to do with permissions, or filetype or something. The path that i'm using is the entire path including filename and .txt. I've tried copying the file to the root of C:. Then i get an error permission denied. It does however seems to find the file. Could anyone shed some light on what im doing wrong? Thanks in advance!
×
×
  • Create New...