Hello,
I have some problems to make to work my script. The scope of this script is to copy.vmx files form one storage to another one (Main and DR sites).
this script mistakes to read the directory names composed by two words
separated from the space.
for example:
Need to copy "/vmfs/volumes/datastore_A/db server/.vmx" to "/vmfs/volumes/datastore_B/db server/.vmx"
The script tries to copy
"/vmfs/volumes/datastore_A/db/.vmx" to "/vmfs/volumes/datastore_B/db"
and
"/vmfs/volumes/datastore_A/server/.vmx" to "/vmfs/volumes/datastore_B/server"
Attacched the script. Feel free to modify all that you want in this script
Thanks in advance
regards
Davide
I think the first line in the do structure must be
ls -1 "$lunSource$LINE" | {
thus between quote's or else the space would seperate it as multiple directories.
Arnim van Lieshout
Solved !
modified follwing lines
<![endif]><![if gte mso 9]>
ls -1 $lunSource$LINE
with
ls -1 “$lunSource$LINE”
and
cp -u "$lunSource$LINE/.vmx"
"$lunTarget$LINE"
with
cp "$""$"/.vmx "$""$"
Davide