Wednesday 25 July 2018

windows 7 - Rename files in a batch file

I want to rename file1 to file2 using a batch file in Windows 7 but with no luck.


Below is the batch file:


@echo off
c:
cd\test
ren file1 file2

Error message I get is


syntax error.



Update to my question: However, to be more specific, the following is the content of my script named update.cmd which I will run as administrator in Windows 7.


Here it is:


:START
cls
cd C:\Program Files\Autodesk\Revit Structure 2012\Program
ren C:RevitMFC.dll RevitMFC_dll.bak

When I cross check the program lines above using cmd.exe run as administrator, I found out the error msg is "access is denied".


Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Ben>cd c:\program files\autodesk\revit structure 2012\program

c:\Program Files\Autodesk\Revit Structure 2012\Program>ren c:revitmfc.dll revitm fc_dll.bak Access is denied.

c:\Program Files\Autodesk\Revit Structure 2012\Program>

My question: How do I overcome this "Access is denied" ?

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...