# Poweshell: Get the root drive letter, and move into it $FILE_PARTS = $DESTINATION_DIR.split(":") Set-Location "${FILE_PARTS[0]}" # Recursively create subfolders New-Item -Name $FILE_PARTS[1].Substring(1) -ItemType directory