Eliminar carpeta padre de muchos directorios
Básicamente esto:
C:\tu\directorio\randomnumbers\images\file.ext
A esto:
C:\tu\directorio\randomnumbers\file.ext
Solución, un archivo bacth con lo siguiente:
@ECHO ON
SET MoveToDir=C:\tu\directoriodestino\random
SET MoveFromDir=C:\tu\directorioorigen\random\folder
:: Move the folders from the move directory to the move to directory
FOR /D %%A IN ("%MoveFromDir%\*") DO MOVE /Y "%%~A" "%MoveToDir%"
:: Move any remaining files (or folders) from the move directory to the move to directory
FOR /F "TOKENS=*" %%A IN ('DIR /S /B "%MoveFromDir%\*.*"') DO MOVE /Y "%%~A" "%MoveToDir%\"
GOTO EOF
Happy coding!
C:\tu\directorio\randomnumbers\images\file.ext
A esto:
C:\tu\directorio\randomnumbers\file.ext
Solución, un archivo bacth con lo siguiente:
@ECHO ON
SET MoveToDir=C:\tu\directoriodestino\random
SET MoveFromDir=C:\tu\directorioorigen\random\folder
:: Move the folders from the move directory to the move to directory
FOR /D %%A IN ("%MoveFromDir%\*") DO MOVE /Y "%%~A" "%MoveToDir%"
:: Move any remaining files (or folders) from the move directory to the move to directory
FOR /F "TOKENS=*" %%A IN ('DIR /S /B "%MoveFromDir%\*.*"') DO MOVE /Y "%%~A" "%MoveToDir%\"
GOTO EOF
Happy coding!