dir /A:D /O:N >> c:\tree.txt
FOR /F "tokens=1,2 delims=\=" %%I IN (tree.txt) DO (
ECHO "F:\EBDOOR\running\Cache\"%%I > c:\out.txt
)
FOR /F "tokens=1,2 delims=\=" %%I IN (tree.txt) DO (
winrar a -ibck Z:\zip\cacheshop\%%I.zip %%I
)
原文:https://www.cnblogs.com/sfqas/p/12181878.html