+ Post New Thread
Results 1 to 10 of 10
Scripts Thread, Script to copy folder and contents at startup in Coding and Web Development; Been presented with yet another woderful educational software package to install, should be ok as it's compatible with W98 I've ...
  1. #1
    chrbb's Avatar
    Join Date
    Oct 2005
    Location
    Midlands
    Posts
    1,507
    Thank Post
    141
    Thanked 67 Times in 62 Posts
    Rep Power
    46

    Script to copy folder and contents at startup

    Been presented with yet another woderful educational software package to install, should be ok as it's compatible with W98

    I've written a script to install it silently, but the program needs a folder and it's contents copied to the client pc.

    My script makes a folder, installs the software, but copies the folder and not the contents. It's a batch file, simple xcopy with /s /e /d, works when I run it manually but not at startup. The paths must be right as the folder is copied but not the contents.

    Any ideas where I might be going wrong?

  2. #2

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,940
    Thank Post
    886
    Thanked 1,693 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    Robocopy will be better. It will create all the required folders for you and copy all the contents of the source. I have found xcopy to be hit and miss at times. Does your server share have permissions do domain computers can see the contents?

    Code:
    robocopy "\\soruceserver\share" "C:\destination-folder" /MIR
    What client OS are you running?
    Last edited by FN-GM; 20th March 2012 at 06:47 PM.

  3. Thanks to FN-GM from:

    chrbb (20th March 2012)

  4. #3
    chrbb's Avatar
    Join Date
    Oct 2005
    Location
    Midlands
    Posts
    1,507
    Thank Post
    141
    Thanked 67 Times in 62 Posts
    Rep Power
    46
    Windows 7 and xp, I'll try robocopy, is it on server 2008 r2 or do I need to install it?

  5. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,940
    Thank Post
    886
    Thanked 1,693 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    The server wouldnt matter.

    Its built into Windows 7 but not XP. You can extract a copy of robocopy.exe from the Windows XP Support tools. You can just stick robocopy.exe in a shared drive.

    On your source share does the computer group "domain computers" have read rights?

  6. #5
    chrbb's Avatar
    Join Date
    Oct 2005
    Location
    Midlands
    Posts
    1,507
    Thank Post
    141
    Thanked 67 Times in 62 Posts
    Rep Power
    46
    Yes, it's the software drive.

  7. #6

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,940
    Thank Post
    886
    Thanked 1,693 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    ok no worries. Give robocopy a shot.
    Last edited by FN-GM; 20th March 2012 at 07:15 PM. Reason: Typo Corrected

  8. #7

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,808
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    Quote Originally Posted by FN-GM View Post
    ok no worries. Give robocopy a shit.
    autocorrect fail?

  9. #8

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,940
    Thank Post
    886
    Thanked 1,693 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    Quote Originally Posted by glennda View Post
    autocorrect fail?
    Oops Typo i meant to put shot

  10. #9

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,940
    Thank Post
    886
    Thanked 1,693 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    @chrbb how did you get on?

  11. #10
    chrbb's Avatar
    Join Date
    Oct 2005
    Location
    Midlands
    Posts
    1,507
    Thank Post
    141
    Thanked 67 Times in 62 Posts
    Rep Power
    46
    Right - checked my switches and I'd changed /s for something else. Put /s back on works like a dream.

    Decided not to install at startup though, as the software has eight parts to it each needing a folder copying. So have written a script to do all the copying and installing, but am going to do it manually on each teacher laptop as I also have 2 other new programs to install, one of which needs the usb device plugged in whilst the software installs TBF though it does mean that I get to give staff laptops the once over!

    Nice little job whilst running the creche in the IT suite during parent's evening next week.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 5
    Last Post: 1st July 2014, 08:34 AM
  2. Replies: 5
    Last Post: 29th January 2013, 10:16 AM
  3. script to copy folder contents
    By ful56_uk in forum Scripts
    Replies: 4
    Last Post: 7th April 2010, 10:08 AM
  4. Script to copy folder
    By cookie_monster in forum Windows
    Replies: 5
    Last Post: 7th October 2009, 10:52 AM
  5. Replies: 2
    Last Post: 17th April 2008, 11:25 AM

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
  •