powershell - Rename fails because it represents a path or device name -
when run following command:
rename-item some\long\path\filename.txt some\long\path\newname.txt
i receive following error message:
cannot rename specified target, because represents path or device name.
i've tried wrapping paths in quotes , doesn't succeed either.
for second argument, just use new name not full path. is, this:
rename-item some\long\path\filename.txt newname.txt
from docs, says of -newname<string>
enter name, not path , name. if enter path different path specified in path parameter, rename-item generates error.
Comments
Post a Comment