AutoHotkey Community

It is currently May 26th, 2012, 2:18 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: January 7th, 2008, 1:14 am 
Offline

Joined: January 7th, 2008, 1:04 am
Posts: 10
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)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 1:22 am 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1833
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 :roll:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 1:53 am 
Offline

Joined: January 7th, 2008, 1:04 am
Posts: 10
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 :roll:


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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 2:22 am 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1833
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 2:52 am 
Offline

Joined: January 7th, 2008, 1:04 am
Posts: 10
?? 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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 3:11 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8775
You may try to adapt the example I have given here: http://www.autohotkey.com/forum/viewtop ... 249#133249

Instead of one large list of jpeg files, you may do it something like 1000 files at a time.

:)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 3:34 am 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1833
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 3:44 am 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
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.

_________________
Image
ʞɔпɟ əɥʇ ʇɐɥʍ


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 7th, 2008, 3:45 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8775
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.

:)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 4:10 am 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1833
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 4:27 am 
Offline

Joined: January 5th, 2008, 9:51 pm
Posts: 26
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 4:37 am 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1833
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)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 4:41 am 
Offline

Joined: January 5th, 2008, 9:51 pm
Posts: 26
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 4:56 am 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1833
Quote:
waits a few moments and the computer shuts itself down.


lol :?: :?:

that doesnt sound good. i reckon you should reformat at some point :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2008, 8:19 pm 
Offline

Joined: January 7th, 2008, 1:04 am
Posts: 10
#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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Retro Gamer, tank, tommy and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group