+ Start a Discussion
Daniel RobertsDaniel Roberts 

sfdx convert mdapi can't find package.xml. See Screenshot.

Hey guys, I'm running sfdx force:mdapi:convert -r mdapipkg -d force-app. It's not converting the file "package.xml" 

I have a screenshot here, and I'm not sure what I need to to do with my file path to get the convert to work. The Salesforce CLI just keeps saying that the folder doesn't have the package.xml file when it is clearly the only file in the folder. THanks for your help. 
package.xml file location
Alain CabonAlain Cabon
Hi,

There are two commands if you don't use the workbench ( https://workbench.developerforce.com/metadataRetrieve.php ) or Ant Migration Tool (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_deploying_ant_retrieveCode.htm) for the retrieving of data (not only the unique file package.xml)
  1. sfdx force:mdapi:retrieve -r ./mdapipkg -u <username> -k ./package.xml
  2. sfdx force:mdapi:convert -r mdapipkg 
"The patch specified is not a directory or doesnt' contain a package.xml"

You are already into "mdapipkg". Stay in "trail-comp" (parent)