[wpkg-users] Renaming file in System32

Malte Starostik wpkg at xodtsoq.de
Wed Aug 17 16:34:48 CEST 2016


On Wednesday 17 August 2016 10:53:43 Nicolas Briche wrote:
> Hi,
> 
> Le 2016-08-17 10:19, Jan-Niklas.Nowak at materna.de a écrit :
> > %RESOURCES% links to the folder which includes the images that have to
> > be copied.
> 
> Two thoughts, besides the rights issues already mentioned:
> 
> - Maybe 'rename' should be ran with %COMSPEC% (%COMSPEC% /c rename); I
> don't remember if it's a separate exe or built into cmd.

rename is a cmd builtin, so %COMSPEC% (or just cmd nowadays) /c is required.
 
> - Also try to specify an absolute path for the new name along with the
> old name.  We don't really know what the current working directory is
> when you invoke rename, so it may try to rename the file somewhere that
> either doesn't exist or you don't have rights to it.

Definately not.  rename, as opposed to many other file commands will NOT accept 
a target name with path.  As opposed to move on Windows and mv elsewhere, 
rename really just renames and has no way of moving the file to a different 
path.

Kind regards,
Malte


More information about the wpkg-users mailing list