computing
  • 0

Batch file to shut down system

  • 0

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

Share

0 Answers

  1. 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 PathNameFileNameA New_FileNameA
    ren PathNameFileNameB New_FileNameB
    shutdown -s -f
    :: End_Of_Batch to shutdown
    


    To auto rename at boot

    @echo off
    ren PathNameFileNameA New_FileNameA
    ren PathNameFileNameB 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.

    • 0