Deleting Folders

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Leeo (Leeo_at_discussions.microsoft.com)
Date: 06/30/04


Date: Wed, 30 Jun 2004 05:01:01 -0700

I am trying to delete a folder on a remote computer. I have tried using the File System object but i keep getting permission denied. The code that i used to do this is as follows;

Set oFSO = CreateObject("Scripting.FileSystemObject")

IPAddress = "10.17.1.12"
username = "test"
localFolder = "\\" & IPAddress & "\c$\Documents and Settings\" & username
oFSO.DeleteFolder(localFolder)

Any Ideas??



Relevant Pages

  • RE: Scripting and creating home directories
    ... > would like to accomplish is assign and create home directories. ... > been unable to have the system create the folder. ... > I tried substituting the actual username for %username% but it still does not ... Will I have to create a File System Object to create ...
    (microsoft.public.windows.server.scripting)
  • Re: Read multiple files in a directory
    ... file copy or a folder copy to another directory. ... Do you have the scripting help file (Windows Script 5.6 ... Read about the file system object, which you can use to obtain file ...
    (microsoft.public.scripting.vbscript)
  • Read files on a remote computer
    ... subfolders in a specific folder on a remote computer. ... I have a script that obtain all the files in all the subfolders inside ... Dim objFSO, objFolder, colFiles, objSubFolder, objSubFile, n ... And I have a script that connects to a remote computer an obtain the ...
    (microsoft.public.scripting.vbscript)
  • Re: VBScript That Copies Folder Content To Remote Computers
    ... Set objFSO = CreateObject ... it finishs all the servers in the text file it echos all finished. ... folder I want to copy already exist on a remote computer, ...
    (microsoft.public.scripting.vbscript)
  • Re: Newby question : How to Count words & Lines in *.cpp and *.txt and *.h ?
    ... > in a given folder. ... I suggest you re-write as a complete question ... File System Object. ...
    (microsoft.public.scripting.vbscript)