Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Removal of CD-created empty directories on publish

I changed the folder structure of my site to be less flat. When I republished, I noticed that CityDesk didn't remove the old directories, even though they were now empty.

Shouldn't it track directories in citydesk.xml as it does files, and remove them if they're empty, provided it created them in the first place?

Michael Wild
Wednesday, September 25, 2002

It should, but at the same time we don't want to be completely destructive because people do add things that are not under CD's control into folders on the server.

For instance, say I publish my site and it has a pics folder on the server.  But then I use an external FTP program to upload some big pictures that I don't want clogging up my CD .cty file.  If I delete the other pics from CD, CD can't really delete the folder because you still have those other pictures up there.

We could check to see if the folder is empty, but FTP isn't so helpful in this regard.  It _can_ be done, it's just that its trickier than it seems.

Michael H. Pryor
Wednesday, September 25, 2002

RE: We could check to see if the folder is empty, but FTP isn't so helpful in this regard. It _can_ be done, it's just that its trickier than it seems.

You could just try and delete the directory, if it is not empty FTP will refuse the delete.

Andy Hardy
Wednesday, September 25, 2002

It might also be nice to add "links" to CD so that I might have a reference to a file that I intend to have in that directory but am not storying in the CD database itself.

-austin

Austin Ziegler
Friday, September 27, 2002

Maybe, in a future release, you could add a tombstone feature.  You mark the folder or files that you want to get rid of and then it would be easy to get the FTP command to delete the ones you want to lose and keep the ones that should stay.

Rick DeMent
Saturday, September 28, 2002

*  Recent Topics

*  Fog Creek Home