<sigh> looks like revCopyFile will do a 1 minute beachball before timing out if the path does not exist. So I need to check for the existence of the folder path first. Trouble with that is if folder "/users/bobsneidar/installs/customer2/" does not exist I cannot simply say
create folder "/users/bobsneidar/installs/customer2/site2/" Create folder will only create one folder level at a time. I have to iterate through individual folders like so: if not there is a folder "/users/bobsneidar/installs/" then create folder "/users/bobsneidar/installs/" if not there is a folder "/users/bobsneidar/installs/customer2/" then create folder "/users/bobsneidar/installs/customer2/" if not there is a folder "/users/bobsneidar/installs/customer2/site2/" then create folder "/users/bobsneidar/installs/customer2/site2/" NOW I can: revCopyFolder "/users/bobsneidar/installs/customer1/site2/device5/", "/users/bobsneidar/installs/customer2/site2/device5/" revDeleteFolder "/users/bobsneidar/installs/customer1/site2/device5/" I suppose it can't really be easier otherwise you risk destroying entire folder structures with a mistyped command. This is the best arguement I know for storing documents in the database instead of the file system. I'm strongly considering that now. Bob S > On Dec 14, 2017, at 07:45 , Bob Sneidar via use-livecode > <[email protected]> wrote: > > Okay looks like I need to copyFolder, then deleteFolder after checking the > result. > > Bob S > > >> On Dec 14, 2017, at 07:38 , Bob Sneidar via use-livecode >> <[email protected]> wrote: >> >> I am actually trying to MOVE a folder from one location to another. The 201 >> folder is the folder where all the forms for a site go, and that is inside a >> Customer folder containing all the site folders. Inside the site folder >> there may be device folders where the forms specific to a device go. It >> looks like this: >> >> Installs >> ...Customer 1 >> ......Site 1 >> .........Device 1 >> .........Device 2 >> ......Site 2 >> .........Device 3 >> .........Device 4 >> ...Customer 2 >> >> and so on. I have a feature where I can transfer a device to another site, >> and a site to another customer. An odd notion until you relize how often >> data entry people enter duplicates because of spelling changes on the input >> form or simply because they don't want to take the time to search properly. >> >> Having transferred the Site in the database to the correct customer, I now >> need to move the site folder to another customer. renameFolder seems to be >> the only mechanism in place to do this, but apparently will only rename the >> ENDPOINT and NOT a SUBFOLDER of the ENDPOINT. My opinion is it ought to do >> either. >> >> Bob S >> >> >>> On Dec 13, 2017, at 17:04 , Mark Wieder via use-livecode >>> <[email protected]> wrote: >>> >>> On 12/13/2017 04:57 PM, Bob Sneidar via use-livecode wrote: >>>> Thanks Mark. "201" WAS the endpoint. Your suggestion worked! But I didn't >>>> want to copy the whole folder just one of it's subfolders. I even added >>>> other folders and tried to move that, but it failed. It is acting like it >>>> will only move folders a certain level deep. >>> >>> Not sure what you mean. >>> Renaming doesn't copy anything. >>> Did you intend to rename the "201" folder instead? >>> >>> -- >>> Mark Wieder >>> [email protected] >> >> >> _______________________________________________ >> use-livecode mailing list >> [email protected] >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
