General discussion

Locked

Vb Script to delet fies

By mspatel ·
Const DeleteReadOnly = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile("C:\Documents and Settings\xyzname\Local Settings\Temp\*"), DeleteReadOnly


Above script does not work to del file & folders from profile with line 3-error. And try change path to c:\windows\temp - this comes with insuficent resource.
mspatel@ntlworld.com

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by djbrown62 In reply to Vb Script to delet fies

That looks correct to me for deleting a file, but I don't think 'DeleteFile' can delete folders.

Try using the 'DeleteFolder' It will delete folders and subfolders.

Check here:
http://www.microsoft.com/resources/documentation/windows/2000/server/scriptguide/en-us/sas_scr_yzox.mspx

Collapse -

by mspatel In reply to Vb Script to delet fies

Const DeleteReadOnly = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile("D:\Documents and Settings\XYZname\Local Settings\Temporary Internet Files\*.*"), DeleteReadOnly

This does not delete files

Collapse -

by mspatel In reply to

needs support

Back to Windows Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums