Yeah, didn't think about that since, normally (in most of what I do or have
done) permissions of CF managed directories and files wouldn't be a problem.
It would just be another CF managed directory. If it were an issue however,
a well planned directory structure and inheritable permissions would take
care of it... Jim nailed the batch file equivalent though and got around
using CALCS commands ;-) 

 
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 

-----Original Message-----
From: Jim Wright [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 16, 2006 9:12 PM
To: CF-Talk
Subject: Re: Delete directory contents

OK, there is probably a more elegant way...but this would get the
trick done, with ACL's intact...

REM this assumes that "c:\foo" is the directory that you want to empty
echo. >> c:\foo\foo.txt
REM /O option in xcopy preserves ACL's
echo f|xcopy /O c:\foo\foo.txt c:\foo2\foo.txt
rmdir C:\foo /Q /S
move c:\foo2 c:\foo
del c:\foo\foo.txt


On 1/16/06, Dave Watts <[EMAIL PROTECTED]> wrote:
> > Ok, let me try ONE more time with the right command"S"...
> >
> > @echo off
> > rmdir C:\mydir /Q /S
> > mkdir C:\mydir
> >
> > this would delete the directory and recreate it since, like
> > Jim said, I don't believe there is a single DOS command that
> > is equivalent to the linux command he posted
>
> The one minor problem with this approach is that it won't retain the
> directory ACLs of the original directory.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
>
> Fig Leaf Software provides the highest caliber vendor-authorized
> instruction at our training centers in Washington DC, Atlanta,
> Chicago, Baltimore, Northern Virginia, or on-site at your location.
> Visit http://training.figleaf.com/ for more information!
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229746
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to