Create folders of each computername and copy files ..

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Novice7
Posts: 1
Joined: 14 Sep 2015 03:03

Create folders of each computername and copy files ..

#1 Post by Novice7 » 14 Sep 2015 03:14

Hello My first post here,

I have the following issue:

I am trying to create a batch script that does the following: (we are using a process for SCVMM to install a package on more than 7000 computers and send the results (xml and log) files to each folder with the affected computername

(*Target computers are windows xp or windows 7)

The batch script runs on a target computer, "captures" the computer name and creates in a UNC path the folder of the corresponding computername and copies 2 files (xml and log) from a folder called c:\micro on the target computer to the new created computername folder in the UNC path.

The purpose of this batch is to create a folder structure (each folder resprents the computer names ) containing the xml and log files.

Please help
Thanks in advance

Compo
Posts: 600
Joined: 21 Mar 2014 08:50

Re: Create folders of each computername and copy files ..

#2 Post by Compo » 14 Sep 2015 10:14

Apologies in advance to the site admins/mods for my failure to provide a community response to this question.

This type of question really does wind me up, because I see no reason at all why somebody employed and paid to undertake an administrative position over even a handful of PC's, (never mind 7000), should be given free help to perform basic administrative network tasks.

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Create folders of each computername and copy files ..

#3 Post by Squashman » 14 Sep 2015 12:17

Novice7 wrote:The batch script runs on a target computer, "captures" the computer name and creates in a UNC path the folder of the corresponding computername and copies 2 files (xml and log) from a folder called c:\micro on the target computer to the new created computername folder in the UNC path.

The purpose of this batch is to create a folder structure (each folder resprents the computer names ) containing the xml and log files.

Are you not familiar with the basic environmental variables that the operating system provides?
http://ss64.com/nt/syntax-variables.html

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Create folders of each computername and copy files ..

#4 Post by foxidrive » 14 Sep 2015 13:22

Compo wrote:This type of question really does wind me up, because I see no reason at all why somebody employed and paid to undertake an administrative position over even a handful of PC's, (never mind 7000), should be given free help to perform basic administrative network tasks.


It's my impression that a huge number of questions are from schoolwork.

Post Reply