w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
batch - create directories from file names and copy these files in those directories
   @echo off
   pushd "C:some_dir" 
   for /f "tokens=1,2,3 delims=_" %%A in ('dir /b /s /a-d') do (
      md "%%~B"
      copy %%A_%%B_%%C %%B

only in case all files are with name pattern like "abc_012345678_abcabc.ext"

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.