Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. @echo off
  2. Setlocal EnableDelayedExpansion
  3.  
  4. SET ROOT_FOLDER=C:TEST 1
  5. SET TARGET_FOLDER=C:TEST 2
  6.  
  7. FOR /D %%G IN ("%ROOT_FOLDER%"*) do (
  8. CD %%G
  9. FOR /f %%A in ('dir ^| find "File(s)"') do (
  10. set cnt=%%A
  11. Echo %%G : !cnt!
  12. IF !cnt! == 1 (
  13. move /-y "*.*" "%TARGET_FOLDER%"
  14. )
  15. )
  16. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement