"C:\Documents and Settings\Roi\My Documents\Projects\US Concrete\Drainage" "C:\Documents and Settings\Roi\My Documents\Projects\US Concrete\Drainage\TestProjects" "C:\Documents and Settings\Roi\My Documents\Projects\US Concrete\Drainage\TestProjects\ - "I changed your code slightly to start at the "drainage" folder and then removed the test, so it would delete all the subfolders.
oFSO = CREATEOBJ('Scripting.FileSystemObject') oFSCRoot = oFSO.GetFolder('C:\Documents and Settings\Roi\My Documents\Projects\US Concrete\Drainage') FOR EACH oFolder IN oFSCRoot.SubFolders oFolder.Delete(.t.) ENDFORI get this error: "OLE error code 0x800a004c. Unknown COM status code." when it tries to delete the parent of the " - " folder. Here is the wierd part, if I start on the parent "TestProjects", I don't get the error because it doesn't find a subfolder.
oFSO = CREATEOBJ('Scripting.FileSystemObject') >oFSCRoot = oFSO.GetFolder('C:\') >FOR EACH oFolder IN oFSCRoot.SubFolders > IF oFolder.Name = ' - ' > oFolder.Delete(.t.) > ENDIF >ENDFOR