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
lwx228
Level VIII

How do I use JSL to completely remove files from my hard drive?

 

Hi!
For example, delete path c:\1.txt completely, instead of putting it in the recycle bin.
With JSL.
Thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions
uday_guntupalli
Level VIII

Re: How do I use JSL to completely remove files from my hard drive?

@lwx228
          You can use the Delete File function. If you look at the scripting index description of the function, the function has a second optional argument. 

FilePath = "C:\Test.xlsx";

Delete File(FilePath,0);

image.png

Best
Uday

View solution in original post

txnelson
Super User

Re: How do I use JSL to completely remove files from my hard drive?

@lwx228

Items such as what @uday_guntupalli has shown, are documented in the Scripting Guide

     Help==>Books==>Scripting Guide

and also in the Scripting Index

     Help==>Scripting Index

Jim

View solution in original post

3 REPLIES 3
uday_guntupalli
Level VIII

Re: How do I use JSL to completely remove files from my hard drive?

@lwx228
          You can use the Delete File function. If you look at the scripting index description of the function, the function has a second optional argument. 

FilePath = "C:\Test.xlsx";

Delete File(FilePath,0);

image.png

Best
Uday
txnelson
Super User

Re: How do I use JSL to completely remove files from my hard drive?

@lwx228

Items such as what @uday_guntupalli has shown, are documented in the Scripting Guide

     Help==>Books==>Scripting Guide

and also in the Scripting Index

     Help==>Scripting Index

Jim
lwx228
Level VIII

Re: How do I use JSL to completely remove files from my hard drive?

Thank  uday_guntupalli  and Jim for your help!

 

2018-11-28_22-30-42.png