cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.
  • See how to access JMP Marketplace - and - find, create & share add-ins to extend your JMP. Watch video.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
wmwinn
Level I

How to Delete external files? - scripting in JSL

Is there a way to Delete files from within the JSL scripting?  Looking for a DELETE command or something like that.

For example:

myfiles = Files In Directory("pathname")         => provides a list of all files in the pathname, and I would like to delete one or more of those files in the list.

Anybody know how to do this?  Thanks,

- Mark -

1 ACCEPTED SOLUTION

Accepted Solutions
gbu
gbu
Level III

Re: How to Delete external files? - scripting in JSL

Hi,

If you're using an earlier release than jmp10 (for windows), you can in your script create a .bat file and also call this .bat to delete files.

===================================================

/* Create a .bat file command with delete instruction */

Save Text File("C:\deletemyfile.bat","del C:\myfolder\myfile.txt");

/* Execute the .bat file in order to delete the file */

Open("C:\deletemyfile.bat");

===================================================

View solution in original post

3 REPLIES 3
mattflynn
Level III

Re: How to Delete external files? - scripting in JSL

from the JMP 10.01 /Help, Scripting Index, Utility functions:

see:

     Copy File()

     File Exists()

     Delete File()

functions

Best,

-Matt


gbu
gbu
Level III

Re: How to Delete external files? - scripting in JSL

Hi,

If you're using an earlier release than jmp10 (for windows), you can in your script create a .bat file and also call this .bat to delete files.

===================================================

/* Create a .bat file command with delete instruction */

Save Text File("C:\deletemyfile.bat","del C:\myfolder\myfile.txt");

/* Execute the .bat file in order to delete the file */

Open("C:\deletemyfile.bat");

===================================================

wmwinn
Level I

Re: How to Delete external files? - scripting in JSL

Thank you, gbu.  Since I'm running JMP v9, that's exactly what I did.  It's working GREAT.

Question ANSWERED.

Recommended Articles