>- see footer for list info -< no, it would appear that jave is the same - I'd still have to move each file individually.
I wonder if zipping up all the files, copying the zip, unzipping and deleting the originals would have more overhead? On Thu, Feb 19, 2009 at 12:03 PM, Rich Wild <[email protected]> wrote: > yea, stupid files. > > I like the zip idea, very creative. Interesting. > > I'm going to see if I can find any info on Java.io.File - surely that can > help me do this beautifully. > > > On Thu, Feb 19, 2009 at 11:45 AM, Adrian Lynch > <[email protected]>wrote: > >> >- see footer for list info -< >> Still not the answer you want, but if you do this: >> >> <cfdirectory action="CREATE" directory="/dir1/dir2/dir3"> >> >> It'll create dir1 and dir2 if they don't already exist. So if you can work >> out what the lowest level directories are you'll get all the parent ones >> for >> free. >> >> Not so sure about the files though. >> >> Or... >> >> ... how about zipping up the files and dirs you want to move and then >> unzipping in the new location? The benefit of this is that the files and >> dirs won't know a thing, they'll assume there was a little bit of an >> earthquake or something. Files are so stupid sometimes! >> >> Shout if you find something else. >> >> Adrian >> >> > -----Original Message----- >> > From: [email protected] [mailto:dev- >> > [email protected]] On Behalf Of Rich Wild >> > Sent: 19 February 2009 11:38 >> > To: Coldfusion Development >> > Subject: Re: [CF-Dev] moving entire directories >> > >> > >- see footer for list info -< >> > Yea, that's the scenario I'm trying to avoid it involves individual >> > cffile >> > operations. I'm talking about thousands and thousands of them, all >> > within >> > nested dirs etc. >> > >> > It just seems so needlessly expensive, I/O wise. >> > >> > >> > >> > On Thu, Feb 19, 2009 at 11:24 AM, Adrian Lynch >> > <[email protected]>wrote: >> > >> > > >- see footer for list info -< >> > > On CF8 (I think it was introduced then), cfdirectory has the recurse >> > > attribute which means you don't have to do the logic yourself. One >> > query >> > > loop and you can do a copy/move on each file and all the parent dirs >> > will >> > > be >> > > created for you. >> > > >> > > Not exactly the answer you wanted but it does mean it's not as bad as >> > it >> > > could have been... >> > > >> > > ... I think. >> > > >> > > Adrian >> > > >> > > > -----Original Message----- >> > > > From: [email protected] [mailto:dev- >> > > > [email protected]] On Behalf Of Rich Wild >> > > > Sent: 19 February 2009 09:58 >> > > > To: Coldfusion Development >> > > > Subject: [CF-Dev] moving entire directories >> > > > >> > > > >- see footer for list info -< >> > > > Morning, >> > > > >> > > > I'm currently working on a project where an existing CMS creates >> > > > potentially >> > > > thousands of directories (big site). Now, if an editor decided that >> > > > he/she >> > > > wanted to change the location of a page, the nature of this CMS >> > > > (currently) >> > > > is that it would have to get the directory and all its child >> > > > directories and >> > > > move them individually, which to me sounds like a lot of very >> > > > unnecessary >> > > > overhead. >> > > > >> > > > Is there a way (using com objects or harnessing java etc) in which >> > we >> > > > can >> > > > simply move a top level directory without having to perform >> > individual >> > > > cffile operations on all the children? >> > > > >> > > > CF8. >> > > > >> > > > ta >> > > > >> > > > Rich >> > > >> > > >> > > _______________________________________________ >> > > >> > > For details on ALL mailing lists and for joining or leaving lists, go >> > to >> > > http://list.cfdeveloper.co.uk/mailman/listinfo >> > > >> > > -- >> > > CFDeveloper Sponsors:- >> > > >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< >> > > >- Lists hosted by www.Gradwell.com -< >> > > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your >> > help -< >> > > >> > _______________________________________________ >> > >> > For details on ALL mailing lists and for joining or leaving lists, go >> > to http://list.cfdeveloper.co.uk/mailman/listinfo >> > >> > -- >> > CFDeveloper Sponsors:- >> > >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< >> > >- Lists hosted by www.Gradwell.com -< >> > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your >> > help -< >> > >> > No virus found in this incoming message. >> > Checked by AVG - www.avg.com >> > Version: 8.0.234 / Virus Database: 270.10.25/1956 - Release Date: >> > 02/13/09 18:29:00 >> >> >> _______________________________________________ >> >> For details on ALL mailing lists and for joining or leaving lists, go to >> http://list.cfdeveloper.co.uk/mailman/listinfo >> >> -- >> CFDeveloper Sponsors:- >> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< >> >- Lists hosted by www.Gradwell.com -< >> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help >> -< >> > > _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
