Make directory's in subdir tree and copy files (for command)
Posted: 01 May 2011 05:03
My goal is to make a directory in a sub directory and copy files in the map dir
example:
c:\dir\1
c:\dir\2
etc..............
what i want
c:\dir\1\map
c:\dir\2\map
c:\dir\3\map
etc.................
i know a few commands but that whont work
copy files works whit this command
FOR /R %%g IN (.) DO xcopy *.jpg "%%g\*"
i want the jpg files in a sub dir (map)
so i try this command
FOR /R %%g IN (.) DO md map "%%g\*"
it makes directory's in a loop c:\dir\1\map\map\map\map\...........
c:\dir\2\map\map\map\map\...........
c:\dir\3\map\map\map\map\...........
Who knows the command for creating sub directory's an copy *.jpg files to the created directory
I hope you'll understand i'm dutch sorry
another question..........
is it possible to move files with the same directory name to that directory
c:\map\photo1.jpg (file) (move this file to photo1 map)
c:\map\photo1 (map)
example:
c:\dir\1
c:\dir\2
etc..............
what i want
c:\dir\1\map
c:\dir\2\map
c:\dir\3\map
etc.................
i know a few commands but that whont work
copy files works whit this command
FOR /R %%g IN (.) DO xcopy *.jpg "%%g\*"
i want the jpg files in a sub dir (map)
so i try this command
FOR /R %%g IN (.) DO md map "%%g\*"
it makes directory's in a loop c:\dir\1\map\map\map\map\...........
c:\dir\2\map\map\map\map\...........
c:\dir\3\map\map\map\map\...........
Who knows the command for creating sub directory's an copy *.jpg files to the created directory
I hope you'll understand i'm dutch sorry
another question..........
is it possible to move files with the same directory name to that directory
c:\map\photo1.jpg (file) (move this file to photo1 map)
c:\map\photo1 (map)