Author Topic: About Batch Files  (Read 14301 times)

Vgr

  • Global moderator
  • *
  • Posts: 2163
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: About Batch Files
« Reply #25 on: 2011-03-20 18:44:17 »
If you can wait for about some minutes (I want to finish the reading of this awful document first) I'll make it for you. I already told you, it's my pleasure, not a joke.

yarLson

  • *
  • Posts: 708
  • spr nrd
    • View Profile
Re: About Batch Files
« Reply #26 on: 2011-03-20 18:45:22 »
okay sure sounds great. I can be patient, I am just working on my field enhancement project right now. I'll check back in a while

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: About Batch Files
« Reply #27 on: 2011-03-20 18:54:53 »
hey now I am curious again. I have not much experience with batch files but I am wondering if it is possible to write a batch that would rename my hard drive to whatever i want automatically when i run it?
to create a batch file to rename your drive is fairly simple, all you need to do is use the command LABEL and set which drive you want to change and what you want to change it to, so for example to change your C Drive to FF7DISC1 to write
label c: FF7DISC1
in a BAT file (just open notepad copy and paste that line, then save it as a .BAT) then everytime you run it, it will rename your C Drive to that

yarLson

  • *
  • Posts: 708
  • spr nrd
    • View Profile
Re: About Batch Files
« Reply #28 on: 2011-03-20 19:09:56 »
thank you that sounds simple enough appreciate the help :]

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: About Batch Files
« Reply #29 on: 2011-03-20 19:22:23 »
yarLson here is a slightly more advanced .BAT, copy this into notepad and save as .BAT
Code: [Select]
:input
set DRIVE=
set /P DRIVE=Type drive letter: %=%
set INPUT=
set /P INPUT=Type drive name: %=%
if "%INPUT%"=="" goto input
label %DRIVE%: %INPUT%
that is a BAT file that will ask for your input for which drive you want to change the name of and what you want to name it (so for the first question just put the drive letter like "C" and for the second question type the name of the drive like "FF7DISC1" and hey presto it will rename that drive.
« Last Edit: 2011-03-20 20:02:09 by kranmer »

yarLson

  • *
  • Posts: 708
  • spr nrd
    • View Profile
Re: About Batch Files
« Reply #30 on: 2011-03-20 19:28:20 »
thank this is all very helpful. You guys wouldn't happen to know a good website for noobs to learn how to write batch files?

Vgr

  • Global moderator
  • *
  • Posts: 2163
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: About Batch Files
« Reply #31 on: 2011-03-20 19:32:02 »
Yes. It is called n00b Batch-Guide and some tutorials will pop up soon. There is also 'MSN Messenger' which we could use to talk together without putting up 50 pages of dual-discussion.

EDIT : :P

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: About Batch Files
« Reply #32 on: 2011-03-20 19:41:21 »
well i dont know about guides on .BAT files but i use http://www.computerhope.com when i need to find a DOS command to use in a .BAT file (although i know a lot of the commands already since i used to do a fair amount of stuff in DOS) (i only use .BAT files now for when i make installers or when i run mods),

Also on a side note this is the most complicated BAT file i have ever seen is this
http://schnaader.info/sickbat.php
he actually made a game out of .BAT files which to me is amazing.

yarLson

  • *
  • Posts: 708
  • spr nrd
    • View Profile
Re: About Batch Files
« Reply #33 on: 2011-03-20 20:17:30 »
haha thanks for all the help guys. Now if you take a look at the projects thread you'll see the reason behind all my questions :p

Vgr

  • Global moderator
  • *
  • Posts: 2163
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: About Batch Files
« Reply #34 on: 2011-03-20 20:20:19 »
I saw that thread before your answer and already answered :P