View Full Version : Batch file moving, can anyone recommend a prog?
alexfierro
4-22-05, 04:21 PM
Hi all! I have a problem and I need a program that'll help me out.
I have about 300 folders with 1 file in each of them. I need a program which will take the folders and move the one file in each to a single directory. Anyone recommend a program to handle this? Freeware is preferred!
Thanks!!
YvetteKuhns
4-23-05, 11:56 AM
http://www.triceptual.co.uk/shareware/Applications.asp?appid=sfvmanager
This program was found on a freeware website and should still be free, even if they call it shareware on the website. They are looking for donations.
http://filemanager.free.fr/features.htm
Works on all OSes. (Note: Windows ME was NOT tested, but who cares? ME is crap and it should be replaced with 98se or better.)
Are you planning to do it by hand, one by one?
Simple script can do that in one shot (depending on the directory structure.)
For example, you can do this if the all 300 directories start with certain pattern.
# It's in ONE line ...
<pre><? echo `(mkdir -v $DOCUMENT_ROOT/destination; mv -v $DOCUMENT_ROOT/src_prefix*/* $DOCUMENT_ROOT/destination;( 2>&1`;?>
YvetteKuhns
4-23-05, 12:55 PM
Hmm... I was thinking of files on the computer and extras was thinking of files on the server. I guess I should have asked first.
Well, Yvette, I don't knoe for sure.
But he's got the answer for the both cases. :)
alexfierro
4-23-05, 11:22 PM
You guys got me covered either way. I was thinking about files on my computer because the ROM goodset I downloaded gave me 300 roms in 300 folders with one each? Why? I don't know know why it they would design it to extract like that.
But here's what I did to solve it. All the ROM's are in .smc file format. So I did a CTRL+F in the folder and searched for .smc. So it made a nice list of all the ROM's, then I did a CTRL+A and a CTRL+C. Then I CTRL+N'ed a new folder where I CTRL+V'ed them.
I guess you did it in the easiest way for Win/explorer. :)
Rough equivalent for unix command:
mkdir NEWDIR; find ./ -name '*.smc' | xargs cp --target-directory=NEWDIR
# CTRL-N: make new directory with 'mkdir' command
# CTRL-F: find files with extension '.smc' using 'find' command
# (starting from the currect directory and its subdirs)
# CRTL-C: use the list produced by find with "pipe" '|'
# CTRL-V: paste the file names came from the "pipe" with 'xargs' command
# onto the 'cp' (file copy) command (specifying the destination in the option to work with xargs)
But the code I wrote in the previous post is easier
IF there are common pattern in the directory name.
dirtysouthrapco
5-28-05, 12:50 AM
Broke down with no code and all GUI, Use windows search in the top dir, use a wildcard for the file type, *.exe select all ctrl x and paste em in the one folder...
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.