+ Post New Thread
Results 1 to 5 of 5
How do you do....it? Thread, Rename and Copy local file to Server in Technical; We use AB Tutor to log computer activity. I would like to copy these logs to a folder on the ...
  1. #1
    mrforgetful's Avatar
    Join Date
    May 2006
    Posts
    1,637
    Thank Post
    7
    Thanked 15 Times in 15 Posts
    Rep Power
    22

    Rename and Copy local file to Server

    We use AB Tutor to log computer activity.

    I would like to copy these logs to a folder on the server when the user logs off.

    Now all the computers name the files by their date ie 20080215.blg

    This means I need to rename the file to the computer name aswell as copy it, or create a subfolder with the computer name.

    Any ideas? Or do I just tell people logs are lost when the computer is imaged, as current practice.

  2. #2
    Jona's Avatar
    Join Date
    May 2007
    Location
    Cranleigh
    Posts
    469
    Thank Post
    14
    Thanked 50 Times in 48 Posts
    Rep Power
    23
    Sounds fairly simple with a batch script and scheduled task.

    On my machine I have a enviroment variable called COMPUTERNAME which I can see by doing echo %COMPUTERNAME%. I'm not sure if this is their by default (perhaphs someone else can confirm). This combined with xcopy to a UNC path should do the job.....

    Schedule to run as often as you need or just run manually before you image the machine.

    Cheers
    Jona

  3. #3
    mrforgetful's Avatar
    Join Date
    May 2006
    Posts
    1,637
    Thank Post
    7
    Thanked 15 Times in 15 Posts
    Rep Power
    22
    I'm a numpty when it comes to coding...

  4. #4
    Jona's Avatar
    Join Date
    May 2007
    Location
    Cranleigh
    Posts
    469
    Thank Post
    14
    Thanked 50 Times in 48 Posts
    Rep Power
    23
    well bat files are just a list of dos commands so hardly even coding.

    You'd want something *like*

    Code:
    xcopy /E /v /c /y sourcedrive:\sourcefolder\ \\servername\writableshare\%computername%\
    Cheers
    Jona

  5. Thanks to Jona from:

    mrforgetful (26th February 2008)

  6. #5
    mrforgetful's Avatar
    Join Date
    May 2006
    Posts
    1,637
    Thank Post
    7
    Thanked 15 Times in 15 Posts
    Rep Power
    22
    My God that is simple! Cheers Jona.

    I've used scripts to copy stuff before but usally from the server.

    I had no idea you could just put %COMPUTERNAME% and it would automatically do that.

SHARE:
+ Post New Thread

Similar Threads

  1. Rename a PC from a batch file - Any ideas?
    By MrLudwig in forum Windows
    Replies: 13
    Last Post: 8th December 2007, 02:40 AM
  2. Replies: 5
    Last Post: 27th April 2007, 06:30 PM
  3. Local Settings Copy Problem
    By mseaney in forum Windows
    Replies: 7
    Last Post: 15th June 2006, 09:22 PM
  4. Replies: 7
    Last Post: 19th May 2006, 11:53 AM
  5. Replies: 4
    Last Post: 23rd March 2006, 06:27 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
  •