Batch file to shut down system

Microsoft Windows 7 ultimate 64-bit
January 8, 2010 at 00:24:17
Specs: Windows 7 (beta x64)
Hello, ppl!
I have a problem: I'd like to have a batch file to
1. Change file name of two files
2. Shut down the system

And, if is possible, second .bat which would execute when entering system (just autostart) which could change these files' names back.

PS System is beta x64, i din't wanted to write bat from other topics because it could be wrong in '7'.

Thanks for help, Gregoric


See More: Batch file to shut down system

Report •


#1
January 8, 2010 at 03:33:04
As far as I Know a batch coded to run under Windows 2000/XP works fine under Vista/7 either 32 or 64 bits.

So stated, to rename and shutdown

@echo off
ren PathName\FileNameA New_FileNameA
ren PathName\FileNameB New_FileNameB
shutdown -s -f
:: End_Of_Batch to shutdown

To auto rename at boot

@echo off
ren PathName\FileNameA New_FileNameA
ren PathName\FileNameB New_FileNameB
:: End_Of_Batch to autorename

Create a shortcut on your desktop for the shutdown batch while store the shorcut to the autorename one into the StartUp Folder so it is automatically executed at each power on or restart.


Report •

#2
January 8, 2010 at 06:03:59
Ok, I found this very helpful! Thanks!
But I'll show you now what have I created and tell me which versions are working:

[Startup] Rename Config.x to Config2.x and Config3.x to Config.x.

@echo off
ren E:\Blizzard\World of Warcraft\X\Config.x Config2.x
ren E:\Blizzard\World of Warcraft\X\Config3.x Config.x
or
@echo off
ren E:\Blizzard\World_of_Warcraft\X\Config.x Config2.x
ren E:\Blizzard\World_of_Warcraft\X\Config3.x Config.x


Report •

#3
January 8, 2010 at 06:11:22
If you have spaces in your path, you have to enclose in quotes:

@echo off
ren "E:\Blizzard\World of Warcraft\X\Config.x" Config2.x
ren "E:\Blizzard\World of Warcraft\X\Config3.x" Config.x


Report •

Related Solutions

#4
January 8, 2010 at 06:28:16

As lavascript says...

Report •

#5
January 9, 2010 at 09:17:00
Ivo, what's that "shutdown" command ? I mean, there's no such command in XP ?!

Report •


Ask Question