- May
- 380
- 4
Hey all,
I think I might be losing my brain, but I've been having trouble with fileopen. I wrote this quick little batch file to illustrate. Does anyone else have this issue?
If I run it against a text file (I've tried several) I receive:
Any idea what I'm doing wrong? I seems that the handle is not getting set correctly due to the fileclose message. I've also tried to hard code the name to ensure that I wasn't mistyping the command line.
I know I've used fileopen/fileread many times in the past, but I seem to be stuck here.
Thanks,
Michael
I think I might be losing my brain, but I've been having trouble with fileopen. I wrote this quick little batch file to illustrate. Does anyone else have this issue?
Code:
set h=%@FileOpen["%1",r]
set l=%@FileRead[h]
set r=%@FileClose[h]
If I run it against a text file (I've tried several) I receive:
Code:
TCC: (Sys) C:\Temp\xx.btm [2] The parameter is incorrect.
"%@FileRead[h]"
TCC: (Sys) C:\Temp\xx.btm [3] The handle is invalid.
"%@FileClose[h]"
Any idea what I'm doing wrong? I seems that the handle is not getting set correctly due to the fileclose message. I've also tried to hard code the name to ensure that I wasn't mistyping the command line.
I know I've used fileopen/fileread many times in the past, but I seem to be stuck here.
Thanks,
Michael