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 ...
26th February 2008, 02:37 PM #1
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.
26th February 2008, 03:01 PM #2
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.
26th February 2008, 03:07 PM #3
I'm a numpty when it comes to coding...
26th February 2008, 03:13 PM #4
well bat files are just a list of dos commands so hardly even coding.
You'd want something *like*
xcopy /E /v /c /y sourcedrive:\sourcefolder\ \\servername\writableshare\%computername%\
Thanks to Jona from:
mrforgetful (26th February 2008)
26th February 2008, 03:56 PM #5
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.
By MrLudwig in forum Windows
Last Post: 8th December 2007, 03:40 AM
Last Post: 27th April 2007, 07:30 PM
By mseaney in forum Windows
Last Post: 15th June 2006, 10:22 PM
By doomie in forum Windows
Last Post: 19th May 2006, 12:53 PM
By tosca925 in forum Scripts
Last Post: 23rd March 2006, 07:27 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)