This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Shell script: Mount C$, xcopy files over, >> to result file
- From: airzonk <gabegreen at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 2 Dec 2007 01:15:53 -0800 (PST)
- Subject: Shell script: Mount C$, xcopy files over, >> to result file
Hi All:
This is what I'd like to do.
I have a list of machines (by IP address) - about 100 in total.
#!/bin/sh
mount //10.0.1.15/C$ (Parameters for username and password? they are the
same on each machine.)
Now, I would like to mount them all to a share the same name as the machine.
I.E in the example above,
/10.0.1.15/ would be a nice mountpoint.
Then, for each mountpoint, I need to copy some files over:
cp ./DIR1/file1 ./C/Documents\ And\ Settings/All\ Users/Desktop/file2
/10.0.1.15/
If the target directory already exists (and it will), ignore it and simply
place it in that directory.
If the target *file* already exists, overwrite is OK.
You'll have to forgive my rustyness on sh script. It's been awhile and I am
in a huge hurry. Help with this would be greatly appreciated.
Thanks -
Gabe
--
View this message in context: http://www.nabble.com/Shell-script%3A-Mount-C%24%2C-xcopy-files-over%2C-%3E%3E-to-result-file-tf4930952.html#a14113631
Sent from the Cygwin list mailing list archive at Nabble.com.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/