Roh les boules j'ai fait tout ça pour rien
.
Et si je veux ne copier que les fichiers inférieurs à une certaine taille, ça fonctionne moins ta méthode non ?
.
Mes difficultés en batch c'est récupérer les chemins ou noms, tailles de fichiers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| set taillemax=150000
for %%a in (html) do (
For /f "tokens=*" %%f In ('dir /s /b /a-d "%SYSTEMDRIVE%%HOMEPATH%\"*.%%a') Do (
set FILEPATH=%%f
call :size_file "%%f"
)
)
goto exit
:size_file
set taille=%~z1
if %taille% LSS %taillemax% (
xcopy "%FILEPATH%" /Y %~d0\%computername% /s/c/q/r/h
)
goto exit
:exit |
En utilisant un (simple :oops)
xcopy <REPERTOIRE RACINE>\*.html <REPERTOIRE CIBLE>\ /S
On peut y ajouter une condition sur la taille ?
Partager