elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Ingresar Registrarse
08 Septiembre 2008, 19:42  



+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  Scripting
| | | |-+  Varias dudas con Batch
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Imprimir
Autor Tema: Varias dudas con Batch  (Leído 321 veces)
.......................................

Desconectado Desconectado

Mensajes: 82


Apaga la TV y enciende tu mente


Ver Perfil
Varias dudas con Batch
« en: 26 Marzo 2007, 23:11 »

Buenas, alguien me podria explicar lo que dice aqui sobre la linea que sigue a echo off?

:a.bat
::
@ECHO OFF

c:

It is used as a separator between the title and the file itself. Although they do not affect the running, or contribute to the mis-running, of the batch file, they should be used here because DOS will display an unnecessary prompt on the screen for any blank line before an "ECHO OFF" command.


Otra cosa me podeis explicar que dice aqui sobre la line de despues de :a.bat?
It is used as a separator between the title and the file itself. Although they do not affect the running, or contribute to the mis-running, of the batch file, they should be used here because DOS will display an unnecessary prompt on the screen for any blank line before an "ECHO OFF" command.

Y finalmente esta explicacion que habla sobre la linea @echo off

The fourth line is required to tell DOS not to display the succeeding lines on the screen, and the "@" symbol tells DOS not to show the line itself. The first command in typical batch files usually is "ECHO OFF". "Echo" means that the keys struck on the keyboard are "echoed" (displayed) on the screen. Since a batch file is just a series of commands, what is typed in the file would be echoed on the screen as DOS executes each of those lines, just as though you were typing each instruction at the command line. However, in most cases, the user is only interested in the end result and does not need to see everything that DOS is doing. Using the "Echo Off" command means each command issued by the file as it works toward completing the requested task will not appear on the screen. Again, if you wish even that line to be hidden, add the "at" sign ( @ ) before it, as in the example above.

Tambien me gustaria saber si al poner este comando es lo mismo que poner CD WP60:

CD\WP60

Otra pregunta, es lo mismo poner start programa.exe que programa? y si solo pones programa solo acepta exes y bats no?

Gracias y saludos.
« Última modificación: 26 Marzo 2007, 23:21 por seibur » En línea

kefren

Desconectado Desconectado

Mensajes: 408


Qué sabrá un burro de música clásica...


Ver Perfil WWW
Re: Varias dudas con Batch
« Respuesta #1 en: 27 Marzo 2007, 00:32 »

SaluDOS

Pues con respecto a lo primero, la verdad es que no tengo ni idea porque mi nivel de ingles deja mucho que desear...

Citar
Tambien me gustaria saber si al poner este comando es lo mismo que poner CD WP60:

CD\WP60

Pues te puedo decir que no funciona y lo ultimo...

Citar
es lo mismo poner start programa.exe que programa? y si solo pones programa solo acepta exes y bats no?

Pues si, es lo mismo, puedes poner por ejemplo:

Código:
start archivo.txt

o:

Código:
archivo.txt

Ambas son buenas, las dos abriran el archivo con el Bloc de Notas o con el programa que tengas asignado a la extensión .txt

SaluDOS
En línea

sirdarckcat
sdc
CoAdmin
*****
Desconectado Desconectado

Mensajes: 4.523


HAND


Ver Perfil WWW
Re: Varias dudas con Batch
« Respuesta #2 en: 27 Marzo 2007, 02:31 »

:a.bat
no sirve de nada

::
no sirve de nada..

@echo off
apaga el "prompt" (solo se ve lo que sacan los comandos.. no los comandos en si..

cd\WP60 (si estas en c:) te va a mandar a la carpeta: c:\WP60

Saludos!!
En línea

.......................................

Desconectado Desconectado

Mensajes: 82


Apaga la TV y enciende tu mente


Ver Perfil
Re: Varias dudas con Batch
« Respuesta #3 en: 27 Marzo 2007, 22:49 »

Me podrias dar un ejemplo de la salida que tiene al hacer echo off comparado con @echo off es que no lo acano de entender.

Gracias.
En línea

sirdarckcat
sdc
CoAdmin
*****
Desconectado Desconectado

Mensajes: 4.523


HAND


Ver Perfil WWW
Re: Varias dudas con Batch
« Respuesta #4 en: 28 Marzo 2007, 01:13 »

ok :P
Código:
echo off
echo HOLA MUNDO
saca:
Código:
c:\>echo off
HOLA MUNDO
y

Código:
@echo off
echo HOLA MUNDO

saca:
Código:
Hola mundo

Saludos!!
En línea

Páginas: [1] Ir Arriba Imprimir 
Ir a:  







Consolas     La Web de Goku     MilW0rm     MundoDivx

Hispabyte     Truzone     TodoReviews     ZonaPhotoshop

hard-h2o modding    Foros de ayuda    Yashira.org    Videojuegos    indetectables.net   

Noticias Informatica    Seguridad Informática    ADSL    Foros en español    eNYe Sec

Todas las webs afiliadas están libres de publicidad engañosa.

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC