1

Edited: The wmic command must be returning extra spaces or linebreaks, to remove them use a double for: @echo off for /f "usebackq delims== tokens=2" %%x in (`wmic logicaldisk where "DeviceID='Z:'" get Size /format:value`) do for /f "Delims=" %%y in ("%%~x") do set SizeDisk=%%~y for /f "usebackq delims== tokens=...


1

Here are some ways to do that. basically you just need to expand the path property. PS C:\WINDOWS\system32> $PWD Path ---- C:\WINDOWS\system32 PS C:\WINDOWS\system32> $PWD.Path C:\WINDOWS\system32 PS C:\WINDOWS\system32> $PWD | select -Expand Path C:\WINDOWS\system32 PS C:\WINDOWS\system32> (get-location).path C:\WINDOWS\system32


Only top voted, non community-wiki answers of a minimum length are eligible