BookmarkSubscribeRSS Feed
Highlighted
djhanson

Community Trekker

Joined:

Jun 23, 2011

Delete File() supported with wildcard?

Anyone know if a wildcard can be used with the Delete File () command?  I tried *, ? and % but none appear to work.  Just curious if there could be another way (besides using Delete Directory() )?  thx... dj

Like: Delete File("C:\temp\*.jpg");

2 REPLIES
michaelhaslam_p

Community Trekker

Joined:

Sep 15, 2013

Re: Delete File() supported with wildcard?

djhanson:

I do not know of wildcards being supported in the Delete File function.  I would suspect this is a safety issue ... deleting files by mistake from JMP.

However, you could create your own function that would accept wildcards using JMP's PatMatch function with the PatArb function.  Grab the files in your target directory using the files in directory function and then pattern match them, flagging them for use with the Delete File function.

Of course, be careful.  I personally do not use such a function in my scripts because of the risk.

Michael Haslam

jschroedl

Staff

Joined:

Jun 23, 2011

Re: Delete File() supported with wildcard?

Unfortunately, DeleteFile does not currently support wildcards.

John