Delete folder - Can't delete that folder

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Contact:

Delete folder - Can't delete that folder

Post by trenatos »

I'm trying to delete, then create a folder to make sure that it's empty, but the result of the delete is "Can't delete this folder"

Is there a way to check for permission errors?
Marcus
trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Contact:

Re: Delete folder - Can't delete that folder

Post by trenatos »

And solving my own problem:
It seems the issue was that the folder was not empty, so I first loop through and delete all the files in the target folder, THEN do delete folder, and voila it works.
Marcus
William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Delete folder - Can't delete that folder

Post by William Jamieson »

Why doesnt it just work when you delete folder? Is that a LC bug or is that a safety measure?

-Will
trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Contact:

Re: Delete folder - Can't delete that folder

Post by trenatos »

It's a common thing in many languages, though many of them have a specific flag to recurse and delete everything regardless.
Marcus
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Delete folder - Can't delete that folder

Post by jmburnod »

Hi all,
We had a discuss about that in this thread
http://forums.livecode.com/viewtopic.ph ... der#p64890
It contains some precisions about differences for Osx and Windows
Best regards
Jean-Marc
https://alternatic.ch
Post Reply