Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Condicionales
@echo off
echo Comprobar nota
set/a num=%1
if %num% GTR 10 (echo aprobado) else (echo desaprobado)
2. Crear archivos
Guardar salida en un archivo F:\>dir >F:\llama.txt
Agregar datos a un archivo F:\>echo “Prueba”>>F:\llama.txt
3. Abriendo un archivo
4. Borrar archivos
Names
Specifies a list of one or more files or directories. Wildcards may be used
to delete multiple files. If a directory is specified, all files within the
directory will be deleted
/P
Prompts for confirmation before deleting each file.
/F
Force deletes of read-only files.
/S
Deletes specified files from all subdirectories.
/Q
Quiet mode, do not ask if ok to delete on global wildcard.
/A
Selects files to delete based on attributes.
attributes
R Read-only files, S System files, H Hidden files, A Files ready for archiving
- Prefix meaning not
del text.bat borrar en el directorio actual
del c:\text.bat borrar en el directorio especificado
del c:\*.bat borrar todos los archivos .bat
del c:\?est.bat borrar todos los archivos .bat con “est” con letras “est”
5. Mover archivos
6. Creando carpetas
md Peru
md “Departamentos Peru”
md \a\b\c
7. Procesos