BookmarkSubscribe
Choose Language Hide Translation Bar
xenon2090
Community Trekker

open a .txt file by JSL script and save it as a jmp file

I want to open a .txt file by jsl script and save it as a jmp file.
Is there a simple way to do it by scripting?
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: open a .txt file by JSL script and save it as a jmp file

This may be what you are looking for

dt=open("pathtofolder\filename.txt");
close(dt,save("$TEMP\lookup.jmp"));
Jim
3 REPLIES 3
Craige_Hales
Staff (Retired)

Re: open a .txt file by JSL script and save it as a jmp file

look in the scripting index for LoadTextFile() and SaveTextFile(); they don't care about the extension the way open() does.

Craige
0 Kudos
Craige_Hales
Staff (Retired)

Re: open a .txt file by JSL script and save it as a jmp file

and I may have misinterpreted... are you saving a script? a datatable? is the source a .csv? 

Craige
0 Kudos
txnelson
Super User

Re: open a .txt file by JSL script and save it as a jmp file

This may be what you are looking for

dt=open("pathtofolder\filename.txt");
close(dt,save("$TEMP\lookup.jmp"));
Jim