Sei sulla pagina 1di 3

@echo off : AQUI VARIABLES CON TIPOS DE ARCHIVOS set scantxts=*.txt,*.log set scanppts=*.pptx,*.ppt,*.pps,*.ppsx set scanpdfs=*.pdf set scanrars=*.rar,*.tar,*.zip,*.cab,*.7z,*.z,*.

gz set scanexes=*.exe,*.msi set scandocxs=*.doc,*.docx,*.rtf,*.dotx set scanxlsxs=*.xls,*.xlsx,*.csv set scanaudios=*.mp3,*.wma,*.wav,*.m4a,*.midi,*.aac,*.mid set scanvideos=*.avi,*.mpg,*.mpeg,*.flv,*.mp4,*.swf,*.ogg,*.wmv,*.asf set scanjpgs=*.jpg,*.png,*.gif,*.tif,*.bmp,*.jpeg,*.dib,*.jfif,*.psd,*.cdr set scanchm=*.chm set scanhtm=*.MHTML,*.maff,*.htm,*.mht :inicio : AQUI IR A LA RAIZ DE USB O UNIDAD cd\ if exist %temp% (goto scan) else (set temp=%cd%) :scan :scanaccesos set existe=no dir /a:D /b>%temp%\directorios.john.txt for /f "delims=" %%t in (%temp%\directorios.john.txt) do ( if exist "%%t.lnk" de l /s /q "%%t.lnk" ) dir /a /b /x *.lnk>%tmp%\accesosjohn.txt for %%y in (%scantxts%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scantxts%>%temp%\textojohn.txt && set existe=no for %%y in (%scanppts%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scanppts%>%temp%\pptxjohn.txt && set existe=no for %%y in (%scanpdfs%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scanpdfs%>%temp%\pdfsjohn.txt && set existe=no for %%y in (%scanrars%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scanrars%>%temp%\comprimidosjohn.txt && set exi ste=no for %%y in (%scanexes%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scanexes%>%temp%\aplicacionesjohn.txt && set ex iste=no for %%y in (%scandocxs%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scandocxs%>%temp%\docwordsjohn.txt && set exis te=no for %%y in (%scanxlsxs%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scanxlsxs%>%temp%\xlsexceljohn.txt && set exist e=no for %%y in (%scanaudios%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scanaudios%>%temp%\audiosjohn.txt && set exist e=no for %%y in (%scanvideos%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scanvideos%>%temp%\videosjohn.txt && set exist e=no for %%y in (%scanjpgs%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scanjpgs%>%temp%\imagjohn.txt && set existe=no for %%y in (%scanchm%) do ( set existe=si) if %existe% EQU si dir /a /b /x %scanchm%>%temp%\chmjohn.txt && set existe=no for %%y in (%scanhtm%) do ( set existe=si)

if %existe% EQU si dir /a /b /x %scanhtm%>%temp%\htmjohn.txt && set existe=no set numale=%random% set lstvirtual=archivos de texto,archivos microsoft office power point,archivos de adobe reader(pdf),archivos compresos,,archivos de instalacion,archivos micros oft office word,archivos microsoft office excel,archivos de audio,archivos de vi deo,archivos de imagenes,ayuda,paginas salvadas for /f "tokens=1,2,3,4,5,6,7,8,9,10,11,12 delims=," %%a in ("%lstvirtual%") do ( if exist "%tmp%\textojohn.txt" for %%u in (%tmp%\textojohn.txt) do (if not exist "%%a" md "%%a") if exist "%tmp%\pptxjohn.txt" for %%u in (%tmp%\pptxjohn.txt) do (if not exist " %%b" md "%%b" ) if exist "%tmp%\pdfsjohn.txt" for %%u in (%tmp%\pdfsjohn.txt) do (if not exist " %%c\%numale%" md "%%c\%numale%") if exist "%tmp%\comprimidosjohn.txt" for %%u in (%tmp%\comprimidosjohn.txt) do ( if not exist "%%d" md "%%d") if exist "%tmp%\aplicacionesjohn.txt" for %%u in (%temp%\aplicacionesjohn.txt) d o (if not exist "%%e" md "%%e") if exist "%tmp%\docwordsjohn.txt" for %%u in (%temp%\docwordsjohn.txt) do (if no t exist "%%f" md "%%f") if exist "%tmp%\xlsexceljohn.txt" for %%u in (%temp%\xlsexceljohn.txt) do (if no t exist "%%g" md "%%g") if exist "%tmp%\audiosjohn.txt" for %%u in (%temp%\audiosjohn.txt) do (if not ex ist "%%h" md "%%h") if exist "%tmp%\videosjohn.txt" for %%u in (%temp%\videosjohn.txt) do (if not ex ist "%%i" md "%%i") if exist "%tmp%\imagjohn.txt" for %%u in (%temp%\imagjohn.txt) do (if not exist "%%j" md "%%j") if exist "%tmp%\chmjohn.txt" for %%u in (%temp%\chmjohn.txt) do (if not exist "% %k" md "%%k") if exist "%tmp%\htmjohn.txt" for %%u in (%temp%\htmjohn.txt) do (if not exist "% %l" md "%%l") ) :atributos for /f "tokens=1,2,3,4,5,6,7,8,9,10,11,12 delims=," %%a in ("%lstvirtual%") do ( if exist "%%a" attrib +s -a -h -r "%%a" if exist "%%b" attrib +s -a -h -r "%%b" if exist "%%c" attrib +s -a -h -r "%%c" if exist "%%d" attrib +s -a -h -r "%%d" if exist "%%e" attrib +s -a -h -r "%%e" if exist "%%f" attrib +s -a -h -r "%%f" if exist "%%g" attrib +s -a -h -r "%%g" if exist "%%h" attrib +s -a -h -r "%%h" if exist "%%i" attrib +s -a -h -r "%%i" if exist "%%j" attrib +s -a -h -r "%%j" if exist "%%k" attrib +s -a -h -r "%%k" if exist "%%l" attrib +s -a -h -r "%%l") if exist "%tmp%\accesosjohn.txt" for /f "delims=" %%a in (%temp%\accesosjohn.tx t) do (move "%%a" %cd%) if exist "%tmp%\textojohn.txt" for /f "delims=" %%b in (%temp%\textojohn.txt) do (move "%%b" "archivos de texto") if exist "%tmp%\pptxjohn.txt" for /f "delims=" %%c in (%temp%\pptxjohn.txt) do ( move "%%c" "archivos microsoft office power point") if exist "%tmp%\pdfsjohn.txt" for /f "delims=" %%d in (%temp%\pdfsjohn.txt) do ( move "%%d" "archivos de adobe reader(pdf)\%numale%") if exist "%tmp%\comprimidosjohn.txt" for /f "delims=" %%e in (%temp%\comprimidos

john.txt) do (move "%%e" "archivos compresos") if exist "%tmp%\aplicacionesjohn.txt" for /f "delims=" %%f in (%temp%\aplicacion esjohn.txt) do (move "%%f" "archivos de instalacion") if exist "%tmp%\docwordsjohn.txt" for /f "delims=" %%g in (%temp%\docwordsjohn.t xt) do (move "%%g" "archivos microsoft office word") if exist "%tmp%\xlsexceljohn.txt" for /f "delims=" %%h in (%temp%\xlsexceljohn.t xt) do (move "%%h" "archivos microsoft office excel") if exist "%tmp%\audiosjohn.txt" for /f "delims=" %%i in (%temp%\audiosjohn.txt) do (move "%%i" "archivos de audio") if exist "%tmp%\videosjohn.txt" for /f "delims=" %%j in (%temp%\videosjohn.txt) do (move "%%j" "archivos de video") if exist "%tmp%\imagjohn.txt" for /f "delims=" %%k in (%temp%\imagjohn.txt) do ( move "%%k" "archivos de imagenes") if exist "%tmp%\chmjohn.txt" for /f "delims=" %%l in (%temp%\chmjohn.txt) do (mo ve "%%l" "ayuda") if exist "%tmp%\htmjohn.txt" for /f "delims=" %%M in (%temp%\htmjohn.txt) do (mo ve "%%M" "paginas salvadas" if exist "%%~nM_files" move "%%~nM_files" "paginas salvadas" if exist "%%~nM_archivos" move "%%~nM_archivos" "paginas salvadas" ) ping -n 4 localhost>nul for /f "delims=." %%m in (%temp%\htmjohn.txt) do (if exist "%%m_archivos" rd /s /q "%%m_archivos" ) cls :fin del /q /f %temp%\*john.txt

Potrebbero piacerti anche