| View previous topic :: View next topic |
| Author |
Message |
charlie mopps
Joined: 07 Jan 2008 Posts: 10
|
Posted: Mon Jan 07, 2008 12:14 am Post subject: I need to merge 1200 directories into 1 |
|
|
My brother-in-law has a failed hard drive. He brilliantly never backed up all of his family photos. I was able to use testdisk to recover the drive. But now I have 1200 numerically named directories filled with random, numerically named files. Amongst which are random, numerically named JPG files numbering somewhere around 35,000... Many of them duplicates of each other. I even found viruses in the some of the EXE's...
Ugh...
What I want to do is copy every JPG from every subfolder into 1 directory. Leaving behind everything else so I can just delete it.
Any ideas? Any tools already made? Even if I could just merge all the directories, sort by type and delete it would be helpful. I tried the standard windows search and it just crashes under the load.
Even if someone could show me something that was written in AHK for something else and I could tweak it for my purposes? Anything would help.
(btw... this isnt really my first post. My login got screwed up somehow and I had to start over) |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1375
|
Posted: Mon Jan 07, 2008 12:22 am Post subject: |
|
|
go to start > search
go to "look in" and select browse. choose the folder all the sub-folders are in.
in the name field type ".jpg".
click search
wait until it is complete
cut all results and paste into a new folder  |
|
| Back to top |
|
 |
charlie mopps
Joined: 07 Jan 2008 Posts: 10
|
Posted: Mon Jan 07, 2008 12:53 am Post subject: |
|
|
| tic wrote: | go to start > search
go to "look in" and select browse. choose the folder all the sub-folders are in.
in the name field type ".jpg".
click search
wait until it is complete
cut all results and paste into a new folder  |
You apparently missed this part:
| charlie mopps wrote: | | I tried the standard windows search and it just crashes under the load. |
35,000 images to move... windows can't handle it.
Anyways, I think I figured it out on my own:
| Code: | CopyDest=E:\Photos\
Loop, C:\Program Files\testdisk-6.8\win\*.jpg, 0, 1
{
FileCopy, %A_LoopFileFullPath%, %CopyDest%\%A_LoopFileName%, 1 ; Copy with overwrite=yes
if ErrorLevel
MsgBox, Could not copy "%A_LoopFileFullPath%" to "%CopyDest%\%A_LoopFileName%".
Progress, , %a_loopfilename%,
}
Return
Pause::Pause |
|
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1375
|
Posted: Mon Jan 07, 2008 1:22 am Post subject: |
|
|
| Quote: | | 35,000 images to move... windows can't handle it |
of course it can. what happens on your comp? i have folders with many more than 35000 files in and they copy fine. why on earth would microsoft put a limit to the number of files you could copy? and why cant you then just do say 10000 at a time if it didnt work then? |
|
| Back to top |
|
 |
charlie mopps
Joined: 07 Jan 2008 Posts: 10
|
Posted: Mon Jan 07, 2008 1:52 am Post subject: |
|
|
?? The windows search function has a problem with the 17GIG of JPG's
Its not an extraordinary issue. The search feature has limits.
try it on your computer. Search your C:\ for *.* and when it gets done... try select all... then try to copy. It's going to just crash explorer. Trust me. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1375
|
Posted: Mon Jan 07, 2008 2:34 am Post subject: |
|
|
to quote myself
| Quote: | | why cant you then just do say 10000 at a time if it didnt work then? |
you can just press stop at any point on the search you know and then cut and paste those files, and then continue. you dont have to do all 35000 at once if that really is causing you problems |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1249 Location: USA
|
Posted: Mon Jan 07, 2008 2:44 am Post subject: |
|
|
| tic wrote: | | why on earth would microsoft put a limit to the number of files you could copy? |
They just now figured out how to have more than 65536 lines in Excel. _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Mon Jan 07, 2008 2:45 am Post subject: Re: I need to merge 1200 directories into 1 |
|
|
| charlie mopps wrote: | | (btw... this isnt really my first post. My login got screwed up somehow and I had to start over) |
Send a mail to support@autohotkey.com and the admin might set it right.
 |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1375
|
Posted: Mon Jan 07, 2008 3:10 am Post subject: |
|
|
| Quote: | | They just now figured out how to have more than 65536 lines in Excel. |
But thats obvious why that happens, as excel stores its row identifiers in a 2 byte field, so the maximum number of them possible is 2^16=65536 (2 byte = 8+8 bits). What would the reason for not allowing 35000 images to copy, or the size limit of 17GB? I personally cant see why there would be any limitation on a 32bit OS, it should have a limit of 4294967296 files, and i dont believe there should be any limit to the size on all the files, just a single file, this being much too big for a hard drive (NTFS) and would still be too large even if using FAT32 for pictures.
And they didnt just figure out how to have more than 65536 lines. they could have easily allowed it to have many more when they first wrote excel, but didnt think people would need all that information in 1 file. |
|
| Back to top |
|
 |
mmofinatic
Joined: 05 Jan 2008 Posts: 26
|
Posted: Mon Jan 07, 2008 3:27 am Post subject: |
|
|
Its not an issue here in terms of limits or size of cut and paste too high of volume for the windows os but more in terms of limits in number and/or size for the computer itself to handle.
I have 2 machines one is slower than the other -- i also have over 35,000 jpg's from websites ive designed on both pc's. here are the results of my testing here.
#1 -- slower computer 1 gig of memory DDR1
-- try to cut 10,000 jpg's -- computer locks up and crashes.
#3 -- screaming machine -- dual 3.2 dual core amd processors with 6 gigs of memory.
-- try to cut 40,000 jpg's -- computer processes no problem.
so thats the only issue -- the computer itself cant handle it -- microsoft doesnt put a limit to size or numbers. _________________ Only you can prevent stupidity!
-- don't breed you're an idiot |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1375
|
Posted: Mon Jan 07, 2008 3:37 am Post subject: |
|
|
im actually quite interested in why its crashing then. at what point does it crash and what way? are you sure it crashes and isnt just not responding until the process is complete? (ie the gui goes white and unresponsive). I dont really see what the problem is I have 3456 jpgs in many folders on a 170MHz laptop with 256 ram (dont ask about the speed lol) and it will search for and copy all the files fine (even if it does take a while and is annoying about it) |
|
| Back to top |
|
 |
mmofinatic
Joined: 05 Jan 2008 Posts: 26
|
Posted: Mon Jan 07, 2008 3:41 am Post subject: |
|
|
With my computer it crashed --
It stops responding a few seconds after i hit cut (or copy) -- waits a few moments and the computer shuts itself down.
i'd say thats crashing  _________________ Only you can prevent stupidity!
-- don't breed you're an idiot |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1375
|
Posted: Mon Jan 07, 2008 3:56 am Post subject: |
|
|
| Quote: | | waits a few moments and the computer shuts itself down. |
lol
that doesnt sound good. i reckon you should reformat at some point  |
|
| Back to top |
|
 |
charlie mopps
Joined: 07 Jan 2008 Posts: 10
|
Posted: Mon Jan 07, 2008 7:19 pm Post subject: |
|
|
#1. I have 2 gigs of memory and an AMD AM2, its not my computer.
#2. I was cutting from a SEARCH of 1200 directories. Thats the problem.
#3. I already solved the problem with the script I posted. I might tidy that up an make a tool out of it for other people to use. |
|
| Back to top |
|
 |
|