Re: Recursive folder creation

2017-08-07 Thread hh via use-livecode
> Bob wrote: > Wha??? I didn't know this existed. I have a need for that too! I use > a repeat loop to do this. I suppose that is what this function does as well. Here is it, for a "direct" call, in case revSBLibrary is not available. It does the same as Tore's (and probably your) script but is

Re: Recursive folder creation

2017-08-07 Thread Bob Sneidar via use-livecode
Wha??? I didn't know this existed. I have a need for that too! I use a repeat loop to do this. I suppose that is what this function does as well. Bob S > On Aug 7, 2017, at 12:12 , hh via use-livecode > wrote: > >> Brian wrote: >> Check out _revSBEnsureFolder in revSBLibrary for example cod

Re: Recursive folder creation

2017-08-07 Thread Sannyasin Brahmanathaswami via use-livecode
I just came to this myself before coming back here put item -1 of pURL into tFile put item 1 to -2 of pURL into tFolder put tDF &"/" & tFolder into tCompletePath # loop to create sub folders # Of course we know tDF exists, # but we don't know about any folder after that

Re: Recursive folder creation

2017-08-07 Thread hh via use-livecode
> Brian wrote: > Check out _revSBEnsureFolder in revSBLibrary for example code that does this. Brian, WOW! This is great insight! on mouseUp put "/Users/admin/Documents/brian3/showed/us/the/trick/of/marcus/" into ff call "revSBEnsureFolder ff" of stack "revSBLibrary" launch document ff end

Re: Recursive folder creation

2017-08-07 Thread Tore Nilsen via use-livecode
Since we do not need to check whether a folder exists or not before creating it as LiveCode will not create duplicate folders, here is a script that will create nested folders: on mouseUp put specialFolderPath("desktop")& "/testFolder/testOne/test/result" into tFolder set the itemDel to

Re: Recursive folder creation

2017-08-07 Thread Brian Milby via use-livecode
Check out _revSBEnsureFolder in revSBLibrary for example code that does this. > > On Aug 7, 2017 at 12:57 PM, (mailto:use-livecode@lists.runrev.com)> wrote: > > > > Attempts to create a subfolder below a folder that does not exists fail. > Where folder "nat

Re: Recursive folder creation

2017-08-07 Thread Tore Nilsen via use-livecode
+1 Tore > 7. aug. 2017 kl. 19:57 skrev Sannyasin Brahmanathaswami via use-livecode > mailto:use-livecode@lists.runrev.com>>: > > 2) Does it make sense to ask for an enhancement request for the engine to > recursively create folders for a path where itemdel "/" and items -1,-2,-3 > (sub folder

Re: Recursive folder creation

2017-08-07 Thread Tore Nilsen via use-livecode
You can only create one folder at a time. You can not create nested folders in one go. So you need to do like this put tDF & "/media/audio/nature/2017/" into tFolder create folder tFolder put “birds” after tFolder create folder tFolder Regards Tore > > 7. aug. 2017 kl. 19:57 skrev Sannyasin

Re: Recursive folder creation

2017-08-07 Thread Richmond Mathewson via use-livecode
Well, lazy types like me would just create the folder "2017" followed by the folder "birds". Richmond. On 8/7/17 8:57 pm, Sannyasin Brahmanathaswami via use-livecode wrote: Attempts to create a subfolder below a folder that does not exists fail. Where folder "nature" exists but folder "2017" d

Recursive folder creation

2017-08-07 Thread Sannyasin Brahmanathaswami via use-livecode
Attempts to create a subfolder below a folder that does not exists fail. Where folder "nature" exists but folder "2017" does not, attempt to create folder "birds" below 2017 fail. put specialFolderPath["Documents"] into tDF # "/media/audio/nature" #these folders exist # /2017/birds" # does