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 » Thu Dec 18, 2014 3:42 pm

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 » Thu Dec 18, 2014 3:48 pm

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 » Fri Dec 19, 2014 3:13 am

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 » Tue Dec 30, 2014 2:44 am

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: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Delete folder - Can't delete that folder

Post by jmburnod » Tue Dec 30, 2014 12:37 pm

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