Writing to history folder instead of experts/files

 

Hi All,

I have a script that creates .hst files from .csv files. The default path for this process creates the .hst's in the experts/files folder. I then manually copy the created .hst's and paste them into the history folder. How can I eliminate this intermediate step and have the script write directly to the history folder?

Thanks,

Yellowlion

 
string historyPath = TerminalPath()+"\\history\\"+AccountServer();
Print(historyPath);
Append "\\" and your filename to historyPath
 
phy wrote >>
Append "\\" and your filename to historyPath

Phy,

always a pleasure.

hst_filename = "CL1440.hst";
.
.
.
hst_file = FileOpen(hst_filename, FILE_BIN|FILE_WRITE);
.
.//Write to file here
.
string historyPath = TerminalPath()+ "\history\ " + AccountServer() + "\ " + hst_file;
Print(historyPath);  

FileClose(hst_file);

Nothing in the folder. Is the filename correct?

YL

 

Apparently not.

You printed the file path, what did it say?

 
phy wrote >>

Apparently not.

You printed the file path, what did it say?

Pretty interesting how the "\\" escape sequence works in the editor. The path is fine.

hst_file returns the integer 2 at the end of the path.

The script writes fine to experts/files...what do I need to do to write the file to to historyPath? Substituting 'historyPath' for 'hst_filename' in FileOpen() doesn't work.

There's no FileSave() function.

I'm stumped.

hst_filename = "CL1440.hst";
.
.
.
hst_file = FileOpen(hst_filename, FILE_BIN|FILE_WRITE);
.
.//Write to file here
.
string historyPath = TerminalPath()+ "\\history\\" + AccountServer() + "\\" + hst_file;
Print(historyPath);  

FileClose(hst_file);
 
There is FileOpenHistory function
 

Doh! Thanks you two.

Have a great day.

YL

 

There you go, guess I missed that one, just looked at how I wrote something...

 

phy,

I learned something extra working through this with you. That's always a good thing.

'till next time

Peace