What I'm Trying To Accomplish:
- Get list of Virtual Machines ".vmx" file and place in variables
- Give the user and choice of which VM to backup
- Use "ovftool" to produce an export of the chosen VM to a hardcoded location
What I Have So Far:
#!/bin/bash
# MyVariables
#vmFolder=
#vmList=
#vmDestination="~/Desktop/"
vmTool="/Applications/VMware OVF Tool/ovftool"
# DatScript
for i in "/Users/$USER/Documents/Virtual Machines.localized/"* ; do
if [ -d "$i" ]; then
echo $(basename "$i")
fi
done
Still getting used to Bash and FWIW I'm writing this for OS X 10.8 but thought the Unix SE would be best.