As you know you can export a VM using the vSphere Client, if you're trying to use vifs, then you'll wan to query all files under the VM you're trying to export which can be done using one of the vSphere SDK for Perl Utilities and then just download each file to your local system, there is no 'copy all' function. You probably also know that your VM must either be offline or have a snapshot so you can backup the disks.
Regarding converting, you can accomplish this using the free VMware Converter which can convert from various formats including from WS->ESX and ESX->WS (Converter has a CLI but not sure how well it works and not sure if its part of the free version)
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Comuunity
Twitter: @lamw
If you find this information useful, please award points for "correct" or "helpful".