cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
xenon2090
Level I

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?
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

View solution in original post

3 REPLIES 3
Craige_Hales
Super User

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
Craige_Hales
Super User

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
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