Code:
@echo off
color 0A
CLS
ECHOWHAT IS THE USER NAME?
ECHO MACOGA VER.1.0
:MENU
ECHO.
ECHO =================================================================
ECHO ESTE PROGRAMA ME DICE QUIEN ES EL USUARIO DEL PC
ECHO =================================================================
ECHO.
ECHOCARPETA EN ESCRITORIO - 1
ECHO SALIR - 2
ECHO.
set drive=
set /p drive= SE VERA UNA CARPETA CON EL NOMBRE DEL USUARIO?
ECHO.
if "%drive%"=="1" (set "drive=%username%\"
)else if "%drive%"=="2" (goto :eof
) else goto :menu
md %drive%
Este es para enviar resultado de un comandp CMD a texto
Code:
@echo off
color 0A
CLS
:MENU
ECHOMACOGA VER 1.0
ECHODesktop C: - 1
ECHO D: - 2
ECHO E: - 3
ECHO F: - 4
ECHO G: - 5
ECHO H: - 6
ECHO I: - 7
ECHO EXIT - 8
ECHO.
set drive=
set /p drive= HOW MANY GIGABYTES USE THE FOLDERS IN EACH PARTITION?
ECHO.
if "%drive%"=="1" (set "drive=%userprofile%\desktop"
)else if "%drive%"=="2" (set "drive=D:"
)else if "%drive%"=="3" (set "drive=E:"
)else if "%drive%"=="4" (set "drive=F:"
)else if "%drive%"=="5" (set "drive=G:"
)else if "%drive%"=="6" (set "drive=H:"
)else if "%drive%"=="7" (set "drive=I:"
)else if "%drive%"=="8" (goto :eof
) else goto :menu
@echo off
set "folder=%userprofile%\Desktop"
for /f "tokens=1,2 delims=: " %%a in ('robocopy "%folder%" "%folder%" /L /S /NJH /BYTES /FP /NC /NDL /NFL /TS /XJ /R:0 /W:0') do if /i "%%a"=="Bytes" set "size=%%b"
set a=%size%
set /a result=%size%/%11000000%
md GIGAS
echo %result% MEGABYTES > GIGAS\TOTALDESK1.txt
exit
En Español
Code:
@echo off
color 0A
CLS
:MENU
ECHOMACOGA VER 1.0
ECHOEscritorio C: - 1
ECHO D: - 2
ECHO E: - 3
ECHO F: - 4
ECHO G: - 5
ECHO H: - 6
ECHO I: - 7
ECHO EXIT - 8
ECHO.
set drive=
set /p drive= Cuantas megas ocupan las carpetas en cada particion?
ECHO.
if "%drive%"=="1" (set "drive=%userprofile%\desktop"
)else if "%drive%"=="2" (set "drive=D:"
)else if "%drive%"=="3" (set "drive=E:"
)else if "%drive%"=="4" (set "drive=F:"
)else if "%drive%"=="5" (set "drive=G:"
)else if "%drive%"=="6" (set "drive=H:"
)else if "%drive%"=="7" (set "drive=I:"
)else if "%drive%"=="8" (goto :eof
) else goto :menu
@echo off
set "folder=%userprofile%\Desktop"
for /f "tokens=1,2 delims=: " %%a in ('robocopy "%folder%" "%folder%" /L /S /NJH /BYTES /FP /NC /NDL /NFL /TS /XJ /R:0 /W:0') do if /i "%%a"=="Bytes" set "size=%%b"
set a=%size%
set /a result=%size%/%11000000%
md MEGAS
echo %result% MEGABYTES > MEGAS\TOTALDESK1.txt
exit