delete files and folders on-rev.com

Thomas McGrath III mcgrath3 at mac.com
Sat May 14 20:54:26 EDT 2011


I'm sorry I stated in the subject but I should have stated in the email that I want to do this from the desktop for folders in my subdomain on on-rev server.

I think I am having permission problems even though I created the folder from the same app and want to delete it I get both the "folder is not empty" error and when I tried to walk through the contents I get the "can't delete this file" error.


 put "FolderName" into tName
 put  "ftp://***************%40lazyriver.on-rev.com:**************@liveconnectonline.com/liveconnectonline/" into tPath
 put tPath & tName & "/" into tFolder
 put the itemDelimiter into myItemDelimiter

 put URL tFolder into tresult
 delete line 1 to 2 of tresult -- first two lines end in . and ..

 repeat with x = 1 to the number of lines of tresult
         if the last char of line x of tresult is not ". " then
            set the itemDelimiter to space
            put item -1 of line x of tresult into tFile
            put tFolder & tFile into tDelete
         
            delete URL  tDelete -- "Can't delete that file"
            put "Result:" && the result & cr after field "Results"
         end if
      end repeat

     set the itemDelimiter to myItemDelimiter
     delete URL tFolder -- "Folder is not empty"
      --revDeleteFolder tFolder -- doesn't work
      put "Result:" && the result after field "All Clients Results"


-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net

On May 14, 2011, at 7:04 PM, Matthias Rebbe wrote:

> Hi Thomas,
> 
> as Björnke already said you can use delete folder. But this only works if the folder is empty.
> 
> To delete folders and their contents (files and also subofolders) i am using
> 
> get shell("rm -r "& quote&xArg&quote)
> 
> where xArg contains the name of the folder i want to delete.
> 
> Regards,
> 
> Matthias
> 
> 
> Am 14.05.2011 um 21:52 schrieb Thomas McGrath III:
> 
>> I am having problems deleting files and or folders via script.
>> 
>> I have searched and found that revdeleteFolder does not work. But what does?
>> 
>> I keep getting errors saying can't delete that file etc.
>> 
>> I looked through the lessons online and searched the list but did not find any tuts yet.
>> 
>> Any one have a tut on this?
>> 
>> Thanks
>> 
>> -- Tom McGrath III
>> http://lazyriver.on-rev.com
>> 3mcgrath at comcast.net
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list