Question re rename command

  • Thread starter Thread starter loial
  • Start date Start date
L

loial

Why does this work :

Z:\>rename w v

but not this? :

Z:\>rename Z:\v Z:\w
The syntax of the command is incorrect.

What is wrong with the syntax?
 
loial said:
Why does this work :

Z:\>rename w v

but not this? :

Z:\>rename Z:\v Z:\w
The syntax of the command is incorrect.

What is wrong with the syntax?
Rename will not permit a drive letter (or directory path) on the second
argument, because you cannot rename across devices (like the unix 'mv' command
does, and the 'MOVE' DOS command also does).

rename Z:\v w
move Z:\v w
move Z:\v Z:\w

will work.

as will
move Z:\v C:\w
 
loial said:
Why does this work :

Z:\>rename w v

but not this? :

Z:\>rename Z:\v Z:\w
The syntax of the command is incorrect.

What is wrong with the syntax?
Rename will not permit a drive letter (or directory path) on the second
argument, because you cannot rename across devices (like the unix 'mv' command
does, and the 'MOVE' DOS command also does).

rename Z:\v w
move Z:\v w
move Z:\v Z:\w

will work.

as will
move Z:\v C:\w
 
loial said:
Why does this work :

Z:\>rename w v

but not this? :

Z:\>rename Z:\v Z:\w
The syntax of the command is incorrect.

What is wrong with the syntax?

The general answer is: Type

ren /?

at the Command Prompt. This will show you the
valid uses of the command, plus some examples.
 
Back
Top