1

Bummed that I seem to be the only one who's had this problem so far.

When I run sfdx force:source:retrieve with my manifest sfdx force:source:retrieve -x manifest/package.xml i get this bizarre error that I haven't found anywhere on the intertubes

ERROR running force:source:retrieve: ENOTDIR: not a directory, open '.../dev/force-app/main/default/objects/Account.object/Account.object'

I can't find anything that refers to ENOTDIR. I also don't understand why it's trying to turn Account.object into a folder and then put Account.object into it? So bizarre. Package.xml below

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexComponent</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>
    <types>
        <members>*</members>
        <name>AuraDefinitionBundle</name>
    </types>
    <types>
        <members>*</members>
        <name>CustomMetadata</name>
    </types>
    <types>
        <members>*</members>
        <name>Workflow</name>
    </types>
    <types>
        <members>API_Key__mdt</members>
        <members>Account</members>
        <members>AccountContactRole</members>
        <members>Activity</members>
        <members>Affiliate__c</members>
        <members>Agenda_Item__c</members>
        <members>Annuity__c</members>
        <members>Apex_Control_Panel__c</members>
        <members>Asset</members>
        <members>AssetRelationship</members>
        <members>AssistantProgress</members>
        <members>Auto_Insert__c</members>
        <members>Billing_Summary__c</members>
        <members>Blank_Meeting__c</members>
        <members>Calendar_Setting__c</members>
        <members>Campaign</members>
        <members>CampaignMember</members>
        <members>Case</members>
        <members>CaseContactRole</members>
        <members>Cash_Payments__c</members>
        <members>Cash_Transaction__c</members>
        <members>ChatterActivity</members>
        <members>Check_Blotter__c</members>
        <members>Client_Meeting__c</members>
        <members>CollaborationGroup</members>
        <members>CollaborationGroupMember</members>
        <members>Compliance_Item__c</members>
        <members>Contact</members>
        <members>ContactRequest</members>
        <members>ContentVersion</members>
        <members>Contract</members>
        <members>ContractContactRole</members>
        <members>Display_History__c</members>
        <members>DuplicateRecordItem</members>
        <members>DuplicateRecordSet</members>
        <members>EmailMessage</members>
        <members>Employee__c</members>
        <members>Estate_Planning_Infomation__c</members>
        <members>Event</members>
        <members>ExchangeUserMapping</members>
        <members>Fee_Offset__c</members>
        <members>FeedItem</members>
        <members>ForecastingCategoryMapping</members>
        <members>Goal__c</members>
        <members>Image</members>
        <members>Insurance_Commission_del__c</members>
        <members>Insurance_Policy__c</members>
        <members>Lead</members>
        <members>Macro</members>
        <members>MacroAction</members>
        <members>MacroInstruction</members>
        <members>Office__c</members>
        <members>Opportunity</members>
        <members>OpportunityCompetitor</members>
        <members>OpportunityContactRole</members>
        <members>OpportunityLineItem</members>
        <members>OpportunityTeamMember</members>
        <members>Order</members>
        <members>OrderItem</members>
        <members>PFA_Report_Line_Item__c</members>
        <members>PFA_Report__c</members>
        <members>PartnerRole</members>
        <members>PersonAccount</members>
        <members>Pricebook2</members>
        <members>PricebookEntry</members>
        <members>Printer__c</members>
        <members>Product2</members>
        <members>Progress_Reports__c</members>
        <members>Project__c</members>
        <members>Purchase_Summary__c</members>
        <members>Queue__c</members>
        <members>QuickText</members>
        <members>Recommendation</members>
        <members>RecordAction</members>
        <members>RequestsForAccessSIQ</members>
        <members>Rolodex__c</members>
        <members>Roth_Conversion__c</members>
        <members>SAVER_Transaction__c</members>
        <members>SF_Feature__c</members>
        <members>SF_Project_Tracker__c</members>
        <members>Scorecard</members>
        <members>ScorecardAssociation</members>
        <members>ScorecardMetric</members>
        <members>Security__c</members>
        <members>Service_Providers__c</members>
        <members>Site</members>
        <members>SocialPersona</members>
        <members>SocialPost</members>
        <members>Solution</members>
        <members>StreamActivityAccess</members>
        <members>StreamingChannel</members>
        <members>Target__c</members>
        <members>Task</members>
        <members>Test_Categories__c</members>
        <members>Topic</members>
        <members>TopicAssignment</members>
        <members>Trade_Request__c</members>
        <members>Trade_Security__c</members>
        <members>User</members>
        <members>UserProvisioningRequest</members>
        <name>CustomObject</name>
    </types>
    <types>
        <members>*</members>
        <name>FlexiPage</name>
    </types>
    <types>
        <members>*</members>
        <name>LightningComponentBundle</name>
    </types>
    <types>
        <members>*</members>
        <name>StaticResource</name>
    </types>
    <version>52.0</version>
</Package>

1 Answer 1

1

There is a difference between mdapi format and the new source format. This is documented here

Regular MDAPI format

enter image description here

Source format

enter image description here

In your case, I guess your folder is in mdapi format and you are trying to use source retrieve command.

Convert your source folder into the new source format using sfdx force:source:convert or just have an empty sfdx project.

Or alternatively, try using mdapi retrieve command.

1
  • 1
    Thanks. I just deleted the objects folder completely and re-ran. Worked like a charm. Thanks!
    – MoDiggity
    Commented Aug 9, 2021 at 18:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .