How do you do....it? Thread, Delete a folder using Vbscript in Technical; I trying to edit this script so that it deletes the ucf folder instead of renaming it to .old.
sDS="c:\documents ...
-
2nd June 2008, 08:56 PM #1
- Rep Power
- 0
Delete a folder using Vbscript
I trying to edit this script so that it deletes the ucf folder instead of renaming it to .old.
sDS="c:\documents and settings\"
set oFolder=ofso.getfolder(sDS)
for each oSubFolder in oFolder.subfolders
DocumentumDir = sDS & oSu.name & "\Documentum\"
If oFSO.folderExists(DocumentumDir & "ucf") Then
If oFSO.folderExists(DocumentumDir & "ucf.old") Then
oFSO.deleteFolder(DocumentumDir & "ucf.old")
End If
oFSO.MoveFolder DocumentumDir & "ucf" , DocumentumDir & "ucf.old"
End If
next
-
-
2nd June 2008, 08:59 PM #2 You need to do
Code:
set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder(strFolderPath) See
Delete folder (VBScript) - Windows Server Cookbook
-
SHARE:
Similar Threads
-
By JPhillips173 in forum Scripts
Replies: 2
Last Post: 17th April 2008, 11:25 AM
-
By timbo343 in forum Scripts
Replies: 7
Last Post: 7th February 2008, 12:50 PM
-
By FN-GM in forum Scripts
Replies: 15
Last Post: 22nd December 2007, 05:44 PM
-
By FN-GM in forum Scripts
Replies: 8
Last Post: 17th November 2007, 10:04 PM
-
By sidewinder in forum Windows
Replies: 2
Last Post: 20th March 2007, 03:49 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules