Ejercicio 5
3-
3-
@echo for for %%i in ( hello hola kaixo aloha ) do ( echo %%i )4- (Sin acabar)
::@echo off ::echo Introduce el nombre de un directorio (ruta completa): ::set /p dir1= ::echo Introduce el nombre de otro directorio: ::set /p dir2= ::cd %dir1% ::set bucle = forfiles /M *.bat ::echo %bucle% ::for %%i in %bucle% do ( :: echo %%i ::)5-
@echo off cd C:\ if not exist temp mkdir temp cd temp for /L %%i in (1,+1,10) do ( mkdir carpeta%%i )6-
@echo off :pedirNum echo introduce un numero set /p num1= if %num1% leq 0 goto pedirNum if %num1% geq 10 goto pedirNum for /L %%i in (1,+1,%num1%) do ( echo Windows ruleS, Linux sucks %%i )7-
@echo off set cont=1 set sum=1 :pedirNum echo introduce un numero set /p num1= if %num1% leq 0 goto pedirNum if %num1% geq 10 goto pedirNum cls :sacarOtroViaje echo Windows ruleS, Linux sucks %cont% set /a cont=%cont%+%sum% if %cont% leq %num1% goto sacarOtroViaje
No hay comentarios:
Publicar un comentario