views:

726

answers:

2

I want read a text file on client workstation and copy that text to a text file with that workstation no. this process I need to do for 500+ workstations.

I am having a NOde licence server and I updated its version so now I need to update clients also . after updating the client one file created at c:\ I need to read that file and copy the text in that file with copmuter name. my computer name will be dg0111. so i need to read that file from all nodes and submitt client.

A: 

"copy the text in that file with copmuter name", I do not quite understand this phrase.

Anyway,

To read from a file use "type"

To output to a file, use ">"

To copy, use "copy"

c:\>type filea.txt > newfile.txt
c:\>copy newfile.txt somepath\

To append to a file with another one, use ">>"

c:\>type file1.txt >> currentfile.txt
o.k.w
A: 

If you could provide a pattern on workstation name, that could be useful. So far, you just got:

copy \\workstation1\c$\file.txt \\dg0111\c$\files\workstation1.txt
copy \\workstation2\c$\file.txt \\dg0111\c$\files\workstation2.txt
...
copy \\workstation500\c$\file.txt \\dg0111\c$\files\workstation500.txt
Rubens Farias