Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't delete a folder that starts with a space.
Message
General information
Forum:
Windows
Category:
Troubleshooting
Miscellaneous
Thread ID:
00495553
Message ID:
00495623
Views:
19
>I created a folder name " - ", and now I can't delete it.
>
>It was created using the file scripting object.
>
>I tried:
>delteting it with the FSO.
>Deleting it from explorer.
>deleting it from a DOS window.
>deleteing it from a DOS window using rd "\\.\c:\ - ".
>nothing works.
>
>I'm running windows 2000.
>
>Anybody have any ideas?

I haven't tried this, but what about using the FSO as follows (VFP):
oFSO = CREATEOBJ('Scripting.FileSystemObject')
oFSCRoot = oFSO.GetFolder('C:\')
FOR EACH oFolder IN oFSCRoot.SubFolders
   IF oFolder.Name = ' - '
      oFolder.Delete(.t.)
   ENDIF
ENDFOR
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform