Merlin Moncure wrote: > > > I'll check why the rmdir command is not working as expected. > > > > I just poked around and couldn't figure out the cause. Initdb should > > either remove the directory if it created it, or remove everything > _in_ > > the directory if the directory already existed. I tried the rmdir/del > > /s /q commands in a CMD window and it worked fine. > > Problem is backslash issue :) initdb is issuing del /s /q > "c:/postgres/data". > > Is there a library command to properly resolve slashes?
Uh, I just testd this using CMD and it worked: rmdir /s /q "C:/TMP/TMP" The quotes are required, but are in the code: snprintf(buf, sizeof(buf), "%s /s /q \"%s\"", rmtopdir ? "rmdir" : "del", path); However, I have no problem with pulling his rmdir C code back out of CVS and implementing it. I think it might come in as part of tablespaces anyway so I was just waiting to see how things shook out. If we do it, it would go into /port along with copdir/dp for directories. -- Bruce Momjian | http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])