FileGet needs help?

Started by pguild, January 12, 2025, 11:00:17 AM

Previous topic - Next topic

pguild

FileGet(filename) constantly fails with the error message "Error opening file."
Before giving the FileGet I have verified that filename exists. Also, I can open the file easily with Notpad or with the file option in Winbatch studio.  Note that the file lives on an external USB drive called EasyShare.
The .exe lives in the same directory as the file I am trying to get the text from.

Here is a code snippet.

  if fileexist("Message.txt")
     data = fileget("Reminder.txt")
     Vmessage = data
  else
     Vmessage = ""
  endif

;  fileput("Message.txt",Vmessage)
;endif
www.DogTrainingPsychology.com -- "Don't wish it were easier, wish you were better."  as aphorism by Jim Rohn as quoted in the Kindle Book, GEMS OF WISDOM by Philip Seyer

pguild

Oops. FileGet does not need help. I do. An obvious error in the code (that I need to be able to see) caused the problem. I checked for the existence of one file and then tried to get the contents of another file, which did NOT exist.
www.DogTrainingPsychology.com -- "Don't wish it were easier, wish you were better."  as aphorism by Jim Rohn as quoted in the Kindle Book, GEMS OF WISDOM by Philip Seyer