Page 1 of 1

change a file's name inside a directory problem

Posted: 04 Mar 2021 15:00
by rasil
hi,

I want to change this file called databaseTMP.scu to database.scu but for some reason this isn't working it just says The syntax of the command is incorrect. this is what I've tried

Code: Select all

ren "C:\Users\Public\Documents\databaseTMP.scu" "C:\Users\Public\Documents\database.scu"
Rasil

Re: change a file's name inside a directory problem

Posted: 04 Mar 2021 15:18
by aGerman
The second parameter must not contain the path. Only the new file name.

Steffen

Re: change a file's name inside a directory problem

Posted: 04 Mar 2021 15:21
by ShadowThief
The REN cannot have a drive or path in the destination. cd to C:\Users\Public\Documents and then just ren databaseTMP.scu database.scu instead.

Re: change a file's name inside a directory problem

Posted: 04 Mar 2021 17:15
by Squashman
Some great information in the help file.

Code: Select all

H:\>rename /?
Renames a file or files.

RENAME [drive:][path]filename1 filename2.
REN [drive:][path]filename1 filename2.

Note that you cannot specify a new drive or path for your destination file.