It is currently 21 April 2025, 18:00 Advanced search

Delete Files in Directory

Questions and answers on how to best use Instant Developer

Delete Files in Directory

Postby john w » 11 February 2022, 16:24

I need to delete files in my application 'temp/' directory. It contains blob(.png) and pdf files. There does not seem to be a way to use something like "*.pdf" to delete all files with that extension.

I have tried adding the files to the AddTempFile list but it seems to not work as I would like.

I have looked at the various procs, etc and have not found a way to do this. I cannot seem to get a file count on a directory to set up the logic/control flow.

Does anyone have a suggestion about how I might scheme this out. The ability to get a file count or set a mask in the deleteFile() proc would be enough.

Thanks

John W.
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Delete Files in Directory

Postby john w » 11 February 2022, 17:46

I have been working more with the AddTempFile(). It seems to work on the server, but not from the InDe desktop. I suppose Cassini may not see a user Session.


John W
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Delete Files in Directory

Postby ljwilson » 11 February 2022, 19:15

Right, I don't recall AddTempFile ever working locally with cassini.

...jack
ljwilson
 
Posts: 783
Joined: 26 November 2013, 14:15


Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 8 guests

cron