Jump to content

Recommended Posts

Posted

hello friends :hello:

i wanna use label my HDD by means of a cmd file but it doesnt work. :no: moreover the screen inside cmd window is continiusly sliding. in order to prevent this i have added exit command at the end. but it doesnt exit though. here's my cmd file

========label.cmd=============

echo on

title the partition is being labeled

color 0b

label %systemdrive% SYSTEM

exit

==========================

pls check my label.cmd and tell me what i can do....

thanks in advance :)


Posted

It works normally on my system, I would make echo off, like this:

::========label.cmd=============
@echo OFF
title the partition is being labeled
color 0b

label %systemdrive% SYSTEM

exit
::==========================

as I cannot see why you should put a title, change the colour of the window and echo commands, as it is going to run in a fraction of a second.

Maybe you have a problem with the %systemdrive% variable?

Try the following:

::========label.cmd=============
@echo OFF
title the partition is being labeled
color 0b
Set systemdrive
echo Currrent value of systemdrive variable is %systemdrive%

pause

label %systemdrive%

pause

exit
::==========================

This shows the value of %systemdrive% before trying to change label, (Press ctrl-C to abort the batch if value is incorrect) then lets you interactively supply the new name.

jaclaz

Posted
Don't call it "label.cmd", use a different name or it will keep calling itself.

Yes, you are right.

I tested it saving it as lb.cmd, just to save some typing, without thinking about it! :D

jaclaz

Posted

hey mate (nakira)

thank you very much for your solution. its seems a very important point when dealing with cmd files. and it worked this time :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...