Announcement

Collapse
No announcement yet.

Help needed in vbscript

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help needed in vbscript

    Friends,

    This is my first post regarding scripting.

    I have a query regarding VbScript. I have implemented a script to copy a folder(centralized Roaming profile folder of Domain Users) from one server to another. The script is as follows.

    On Error Resume Next
    Set fso = CreateObject("Scripting.FileSystemObject")
    fso.copyFolder "\\fileprint\staff\NON TEACHING","\\blade1\staff\",true
    wscript.echo "Done !!!
    "

    It copies a the folder named NON TEACHING to STAFF folder of blade1 server. But it exits while copying the seventh folder which is a specific user profile. Before that 6 profile folders are copied perfectly. Administrator has full access of that parent folder as well as sub folders.

    When I try to copy or delete a particular JPG file, it gives an error "File is used by some other process".

    I want to change the location of Profile folders to new server.

    Please help me out in this.

    From,
    Amit Terdalkar
    From,
    Amit
    [/EMAIL]

  • #2
    Re: Help needed in vbscript

    please change you're topic title according the forum rules.

    About you're question. I should use robocopy instead of a script. It works great and easily. You can find robocopy when you using google.
    Also, be sure, that the aren't any open sessions to those files.
    Make sure, that you copy the files when nobody has been logged on, and when the backup doesn't run.
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      Re: Help needed in vbscript

      And check permissions allow you to move/copy all the files

      Tom
      Tom Jones
      MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
      PhD, MSc, FIAP, MIITT
      IT Trainer / Consultant
      Ossian Ltd
      Scotland

      ** Remember to give credit where credit is due and leave reputation points where appropriate **

      Comment


      • #4
        Re: Help needed in vbscript

        If you remove the On Error Resume Next part you will get a more detailed error message.

        Comment


        • #5
          Re: Help needed in vbscript

          I have downloaded and process is running from ROBOCOPY utility. It is doing fine uptill now.

          Thanks Mod,


          From Amit
          From,
          Amit
          [/EMAIL]

          Comment

          Working...
          X