+ Post New Thread
Results 1 to 6 of 6
How do you do....it? Thread, Script to copy a folder from share to root of C if not already there? in Technical; Hi all - title says it all really. I'm coming unstuck writing a script to copy a folder from the ...
  1. #1

    Miscbrah's Avatar
    Join Date
    Dec 2011
    Posts
    884
    Thank Post
    244
    Thanked 249 Times in 150 Posts
    Rep Power
    114

    Script to copy a folder from share to root of C if not already there?

    Hi all - title says it all really.

    I'm coming unstuck writing a script to copy a folder from the servers down to the root of clients C: drives, but only if it isn't there already (as in, it doesn't happen EVERY time.)

    Wanted to put useful thingies like desktop/login backgrounds, custom icons and other goodies in this folder and subfolders to save on network traffic and demands on servers from sharing just the one desktop background from a central location.

    Anyone feeling generous and want to help me out? I don't have beer but I would send you beer if I could.

    Huge thanks in advance if you can.

  2. #2

    AngryTechnician's Avatar
    Join Date
    Oct 2008
    Posts
    3,730
    Thank Post
    698
    Thanked 1,211 Times in 761 Posts
    Rep Power
    394
    Batch file using IF NOT EXIST could do it, or use Robocopy as that will check for modifications and only copy f the file is changed or newer.

  3. Thanks to AngryTechnician from:

    Miscbrah (30th January 2012)

  4. #3

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    730
    Thank Post
    170
    Thanked 56 Times in 54 Posts
    Rep Power
    35
    If using 2008 R2 schema have you tried a machine startup script Computer Configuration > Preferences > Windows Settings > Files . With these you have choices to Replace, update, delete etc.

  5. Thanks to Davit2005 from:

    Miscbrah (30th January 2012)

  6. #4

    Miscbrah's Avatar
    Join Date
    Dec 2011
    Posts
    884
    Thank Post
    244
    Thanked 249 Times in 150 Posts
    Rep Power
    114
    Quote Originally Posted by Davit2005 View Post
    If using 2008 R2 schema have you tried a machine startup script Computer Configuration > Preferences > Windows Settings > Files . With these you have choices to Replace, update, delete etc.
    Oooh, yes overlooked this avenue of approach.

    Right, well it's making the folder and subfolders... But how the devil do I get the .jpgs in there from my network share? I've tried all manner of create/update permutations in Computer Config > Prefs > Windows Settings > Files but no luck yet...

    Thanks tons though guys, think this'll be favourite for sure.

  7. #5

    Miscbrah's Avatar
    Join Date
    Dec 2011
    Posts
    884
    Thank Post
    244
    Thanked 249 Times in 150 Posts
    Rep Power
    114
    OH NO WAIT I just did it!

    Guys, thanks for helping me keep my hair and just a little bit more sanity.

  8. #6

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    730
    Thank Post
    170
    Thanked 56 Times in 54 Posts
    Rep Power
    35
    No problems, glad you sorted in the end.

    2008 R2 maybe the best thing MS has done in years, doing so much now that couldn't do before without scripts running all over the place :-D .

SHARE:
+ Post New Thread

Similar Threads

  1. Script to install if not already installed
    By randle in forum Scripts
    Replies: 7
    Last Post: 24th November 2011, 03:16 PM
  2. Stop pupils writing to root of C:\
    By gerardsweeney in forum How do you do....it?
    Replies: 14
    Last Post: 21st January 2010, 03:48 PM
  3. Replies: 21
    Last Post: 29th December 2007, 10:53 PM
  4. VB Script ti check for folder and then copy contents to PC
    By tosca925 in forum How do you do....it?
    Replies: 4
    Last Post: 2nd October 2006, 08:15 PM
  5. Replies: 3
    Last Post: 1st March 2006, 12:08 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
  •