Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Moving all files in a subdirectory tree with 4nt
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 4th May 05:09
daniel prince
External User
 
Posts: 1
Default Moving all files in a subdirectory tree with 4nt


Is it possible to move all files in a subdirectory tree that match a
file mask to another directory with a 4nt batch file? For example
suppose I wanted to move all *.jpg files from any of the directories
below:

D:\Do***ents and Settings\Daniel\Local Settings\Temporary Internet
Files\Content.IE5

to D:\jpeg

How would I do it? I do not want to move or copy the directory
tree.

I have noticed that the subdirectory names change every time I clear
out temporary internet files so batch files that spell out the
directories are not very practical.

Thank you in advance for all replies.
--
I am TERRIBLY cruel to my cat. I tease him with a vine tendril
until he either jumps up in the air to bat at it or zooms around
in a circle until he gets too dizzy to stand up. What is cruel about
it is that I don't do it nearly as much as he wants me to.
  Reply With Quote


  sponsored links


2 4th May 05:09
steve fábián
External User
 
Posts: 1
Default Moving all files in a subdirectory tree with 4nt


You can use the GLOBAL command to find all source directories, e.g.
(UNTESTED!):

global /i move /e *.jpg d:\jpeg

This will move all files matching *.jpg from the current directory and its
subdirectories to your selected target directory, effectively collapsing the
directory tree.
--
Steve
  Reply With Quote
3 4th May 05:09
mr. jiggs
External User
 
Posts: 1
Default Moving all files in a subdirectory tree with 4nt


Have you tried:

move /h /s *.jp*g c:\DestDir

(starting in the parent directory)

mr.jiggs
  Reply With Quote
4 4th May 05:09
mr. jiggs
External User
 
Posts: 1
Default Moving all files in a subdirectory tree with 4nt


Oops !
That's going to recreate the subdirectories...
  Reply With Quote
5 4th May 05:09
daniel prince
External User
 
Posts: 1
Default Moving all files in a subdirectory tree with 4nt


Thank you. That works. I thought there should be a way to do it
but I kept looking at the move options.
--
I am TERRIBLY cruel to my cat. I tease him with a vine tendril
until he either jumps up in the air to bat at it or zooms around
in a circle until he gets too dizzy to stand up. What is cruel about
it is that I don't do it nearly as much as he wants me to.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666