jueves, 26 de septiembre de 2013

Primeros ejercicios - Comandos DOS

Ejercicio 3

1-
@echo off
ipconfig >> configuraciondered.txt
netstat >> configuraciondered.txt
route print >> configuraciondered.txt

2-
@echo off
start
echo Hola! Ya es la hora del recreo!!!
echo Hola! La clase ya ha terminado!!!

3-
@echo off
xcopy /s /i C:\Users\w2012_template\Desktop\mis_documentos C:\backup
compact /c /s C:\backup

5-
@echo off
echo Introduce un numero
set /p num1=
if %num1% LSS 9 (echo Es negativo)
if %num1% GTR 0 (echo Es positivo)
if %num1% EQU 0 (echo Es cero)

6-
@echo off
echo Introduce un numero
set /p num1=
if %num1% EQU 0
 (
  echo Es cero
) 
else 
(
  if %num1% LSS 0
 (
   echo Es negativo
 )
 else 
(
   echo Es positivo
 )
)

No hay comentarios:

Publicar un comentario