---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [clients](../index.md) / normalizeWebDavPath

# Function: normalizeWebDavPath()

> **normalizeWebDavPath**(`input`): `string`

Defined in: [packages/b2c-tooling-sdk/src/clients/webdav-paths.ts:71](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/d7ff38c7ca2b1411cd718b9554500c9416f00266/packages/b2c-tooling-sdk/src/clients/webdav-paths.ts#L71)

Normalizes a WebDAV path to the form [WebDavClient](../classes/WebDavClient.md) methods take:
relative to `/webdav/Sites/`, starting with a known root (matched without
case, returned in its canonical case), each segment URL-encoded.

Accepts server-returned paths (`/Sites/LOGS/jobs/...`,
`/on/demandware.servlet/webdav/Sites/...`). Rejects traversal (`.`, `..`),
empty segments, control characters, and `%`, `?`, `#`, `:` or `` in a segment.

## Parameters

### input

`string`

## Returns

`string`

## Throws

WebDavReadError with code `invalid-path`
