b2c-webdav
B2C WebDAV Skill
Use the b2c CLI plugin to perform WebDAV file operations on Salesforce B2C Commerce instances. This includes listing files, uploading, downloading, and managing files across different WebDAV roots.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli webdav ls).
WebDAV Roots
The --root flag specifies the WebDAV directory:
impex(default) - Import/Export directorytemp- Temporary filescartridges- Code cartridgesrealmdata- Realm datacatalogs- Product catalogslibraries- Content librariesstatic- Static resourceslogs- Application logssecuritylogs- Security logs
Examples
List Files
# list files in the default IMPEX root
b2c webdav ls
# list files in a specific path
b2c webdav ls src/instance
# list files in the cartridges root
b2c webdav ls --root=cartridges
# list files with JSON output
b2c webdav ls --root=impex --json
Download Files
# download a file from IMPEX (default root)
b2c webdav get src/instance/export.zip
# download to a specific local path
b2c webdav get src/instance/export.zip -o ./downloads/export.zip
# download from a specific root
b2c webdav get customerror.log --root=logs
# output file content to stdout
b2c webdav get src/instance/data.xml -o -
Upload Files
# upload a file to IMPEX
b2c webdav put ./local-file.zip src/instance/
# upload to a specific root
b2c webdav put ./my-cartridge.zip --root=cartridges
Create Directories
# create a directory in IMPEX
b2c webdav mkdir src/instance/my-folder
# create a directory in a specific root
b2c webdav mkdir my-folder --root=temp
Delete Files
# delete a file
b2c webdav rm src/instance/old-export.zip
# delete from a specific root
b2c webdav rm old-file.txt --root=temp
Delete Cartridges
To delete cartridges from a code version, use the cartridges root with the path format {code-version}/{cartridge-name}:
# delete a cartridge from a code version
b2c webdav rm v25_1_0/app_mysite --root=cartridges
# delete multiple cartridges
b2c webdav rm v25_1_0/app_mysite --root=cartridges
b2c webdav rm v25_1_0/int_myintegration --root=cartridges
# list cartridges in a code version first
b2c webdav ls v25_1_0 --root=cartridges
Important: The path is {code-version}/{cartridge-name}, not /cartridges/{code-version}/.... The --root=cartridges (or -r cartridges) flag sets the WebDAV root.
Zip/Unzip Remote Files
# create a zip archive of a remote directory
b2c webdav zip src/instance/my-folder
# extract a remote zip archive
b2c webdav unzip src/instance/archive.zip
More Commands
See b2c webdav --help for a full list of available commands and options in the webdav topic.
Related Skills
b2c-cli:b2c-logs- Filtered log retrieval, search, and real-time tailing (preferred for log exploration)b2c-cli:b2c-code- Higher-level code deployment (preferred for cartridge upload)b2c-cli:b2c-job- Import/export site archives
More from salesforcecommercecloud/b2c-developer-tooling
b2c-docs
Search and read B2C Commerce Script API documentation and XSD schemas using the b2c CLI. Use this skill whenever the user needs to look up class methods, understand API signatures, find available properties on commerce objects (baskets, orders, products, customers), or check XML schema formats for imports. Also use when writing server-side scripts and needing API reference — even if they just say "what methods does Basket have" or "what fields can I import for products".
116b2c-slas-auth-patterns
Implement SLAS authentication patterns in B2C Commerce including passwordless login (email OTP, SMS OTP, passkeys), session bridging between PWA Kit/Storefront Next and SFRA, hybrid authentication (B2C 25.3+), token refresh flows, trusted system on behalf of (TSOB), and JWT validation. Use this skill whenever the user asks about shopper authentication beyond basic login, token exchange flows, passwordless or biometric auth, keeping sessions alive across storefronts, handling 409 Conflict errors on token endpoints, refreshing shopper tokens, or validating JWTs — even if they don't mention SLAS by name.
90b2c-config
Inspect and debug CLI configuration, instance connections, and authentication. Use this skill whenever the user needs to check which dw.json or credentials are active, manage multiple instance profiles, retrieve OAuth tokens for scripting, troubleshoot authentication failures or connection errors, or integrate with VS Code or other editors. Also use when environment variables override config or the wrong sandbox is being targeted -- even if they just say 'why is it connecting to the wrong instance' or 'get me an access token'.
90b2c-controllers
Create storefront controllers using SFRA or classic patterns with server.get/post, middleware chains, and res.render/json. Use this skill whenever the user needs to build a page route, handle form submissions, create AJAX endpoints, extend or override existing controllers, or add middleware to a request pipeline. Also use when debugging route registration or response rendering -- even if they just say 'new page endpoint' or 'handle a POST request'.
86b2c-scapi-schemas
Browse and retrieve SCAPI OpenAPI schema specifications. Use this skill whenever the user needs to list available SCAPI APIs, inspect endpoint paths or request/response shapes, explore data models for products or orders, check which fields an API returns, or understand SCAPI versioning. Also use when looking up API details before building an integration -- even if they just say 'what fields does the product API return' or 'show me the SCAPI endpoints'.
84b2c-job
Run and monitor jobs on B2C Commerce instances using the b2c CLI, including site archive import/export and search indexing. Use this skill whenever the user needs to trigger a job, import a site archive, export site data, rebuild search indexes, check job status, or troubleshoot failed job executions — even if they just say "import this folder" or "rebuild the search index".
83