rename folder not working?

Alex Tweedly alex at tweedly.net
Thu Dec 14 12:02:40 EST 2017


Write yourself (or check if the Master Library already has) a little 
function

  ensureFolderExists pPathName

which will iterate down the elements of the path, checking htey exist, 
or creating if need be.

(I *know* I have one somewhere - but it would be faster to re-write than 
to find :-)

Then use that before the revCopyFolder

Alex


On 14/12/2017 16:52, Bob Sneidar via use-livecode wrote:
> Okay it looks like the revMoveFolder suffers from the same problem that renameFolder does: It only works on the endpoint. CRAP! Why so difficult? I'll come up with a workaround I suppose, or else start saving filled forms in the database itself.
>
> Thanks all for your help.
>
> Bob S
>
>
>> On Dec 14, 2017, at 08:28 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> For Mac sure. Then I need to deal with Windows. But it's my understanding that the rev commands for files use shell anyway, so the work has at least partly been done. But looking at the rev commands it appears there is a revMoveFolder! Lemme try that one.
>>
>> Bob S
>>
>>
>>
>>> On Dec 14, 2017, at 08:22 , Mike Bonner via use-livecode <use-livecode at lists.runrev.com> wrote:
>>>
>>> Can you use shell?  mv to move a folder or cp -R and do a recursive copy?
>>>
>>>  From reading the dictionary, it does seem that your first example should
>>> work if the intention is to move the 201 folder from "Childrens Law Center"
>>> to folder "bobtest" assuming bobtest already exists, and folder 201 doesn't
>>> pre-exist in that folder. (No clue how "clobbers" are handled with rename
>>> when its used to move stuff)
>>
>> _______________________________________________
>> 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