• Welcome! The TrekBBS is the number one place to chat about Star Trek with like-minded fans.
    If you are not already a member then please register an account and join in the discussion!

Finding missing images in an image sequence?

Candlelight

Admiral
Admiral
Had a hiccup during a copy (finder crashed) and now I have holes. Anyone suggest a program for automatically searching for missing files?

I found one called image scanner but that was for Windows only.
 
I don't know about other operating systems, but in Windows you can do a *.jpg *.gif search, etc. It finds all the image files
 
I'm a little unclear on the story. If you were copying, aren't they still in the original location? Can't you just copy again?

Spotlight will search for anything, but I'm sure you know that so I guess you'll have to explain why you want something other than Spotlight. What do you need to do that's different than that?

Basically, I don't really understand the problem...it seems like there's something else going on here that I don't know.
 
If I've got this right, you have a directory with images like

0001.jpg
0002.jpg
...
1001.jpg

but with some gaps, and you want a list of all gaps between the smallest and largest?

I'm sure someone here could write a simple program for you which does that. It would only take about 10 minutes.
 
I was doing a 30,000 file copy which was gonna take 5-6 hours. It crashed part way through, so maybe 12,000 files made it. Now I used to think that Mac copied everything in order, so on my drive I would have 00001-12000, but upon review it turns out I have 00001-12078.

Meaning I still have 12,000 files there, but there are 78 files that didn't come across, and they're in random places.

I manually found about 20 of them, but didn't feeling like sifting through 12,000 files to find the missing ones.

My deadline got pushed back so I ended up deleting and copying again. For future reference though, does anyone know of a mac programme- sorry, app, that can search for the holes?

I found this but it's Windows only:

http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Others/Image-Sequence-Scanner.shtml
 
I can write you such a program in about 5 minutes, as has been said. It would be faster than trying to find a preexisting one.

I suspect there's some way to do it using some combination of unix commands (ls, awk, and so forth) without even writing a program, but figuring out the specifics would also take longer than just writing it.
 
^ Can I recommend parsing the filenames incase they have letters in there too, PICT0065.jpg.

- extract the number and convert to a long integer.

- the results need sorting since the string order (filename order) may not be the numerical order. (imagine a filename 100.jpg and 20.jpg and how they would sort, if they are sorted as strings).
 
It's simple, because you were copying, just delete the files in the destination folder and start over. Or, at least in Windows, you can leave the files in the destination folder, and just copy everything from the original folder. It'll ask you what you want to do with files that already exist in the destination, don't copy for all instance. Voila. You now have all of the files.

Mr Awe
 
...just copy everything from the original folder. It'll ask you what you want to do with files that already exist in the destination, don't copy for all instance.

Yeah...am I missing something? This seems like the easy way to do it.

Far easier than writing a custom program.
 
It's simple, because you were copying, just delete the files in the destination folder and start over. Or, at least in Windows, you can leave the files in the destination folder, and just copy everything from the original folder. It'll ask you what you want to do with files that already exist in the destination, don't copy for all instance. Voila. You now have all of the files.

Mr Awe

I tried that. Did the 'apply all and don't replace if existing still in there'.

It ignored my instruction and started doing all 30,000 again.
 
It's simple, because you were copying, just delete the files in the destination folder and start over. Or, at least in Windows, you can leave the files in the destination folder, and just copy everything from the original folder. It'll ask you what you want to do with files that already exist in the destination, don't copy for all instance. Voila. You now have all of the files.

Mr Awe

I tried that. Did the 'apply all and don't replace if existing still in there'.

It ignored my instruction and started doing all 30,000 again.

Well, it still has to read them all (at least the filenames) before it can decide whether a given file is already in the destination location. Perhaps that's what you saw.
 
What Lindley said. It will give you the total file number, but it's only copying the ones that aren't in the destination folder when it checks. It doesn't know that until it gets to them so it gives the total.
 
What Lindley said. It will give you the total file number, but it's only copying the ones that aren't in the destination folder when it checks. It doesn't know that until it gets to them so it gives the total.

It said 30,000 files to copy, 143GB, 5 hours remaining.

I know what I saw. As 12,000 files were already in there it shouldn't have said what it said.
 
What Lindley said. It will give you the total file number, but it's only copying the ones that aren't in the destination folder when it checks. It doesn't know that until it gets to them so it gives the total.

When the OS checks to see if a file exists during a copy, does it know that the files are the same, to know not to replace them? Having the same filename is not enough.

On my apple laptop I remember having a two related problems to this.


(1) I was copying a folder onto a memory stick -- about 1GB in total -- and it seemed to get stuck half way. Drive light was flashing, but I could not abort the copy. Could not unmount drive. Ejected memory stick manually, and plugged it in again.

When I tried to copy the folder again, it told me the folder already existed, and I could either replace it entirely, or cancel. There were no other options.

What I would have liked is the option to not overwrite existing files.



(2) I had a project which I was backing up to memory stick. I updated some files and dragged the folder over to update the backup.

The folder I was dragging contained only the files I was updating, not the complete project.

The result was that it deleted everything else in the destination folder, leaving just those few files I had edited. There did not seem to be an option to copy a folder and overwrite files where necessary, but not delete anything unnecessarily.
 
When the OS checks to see if a file exists during a copy, does it know that the files are the same, to know not to replace them? Having the same filename is not enough.

The two keys used in most cases are the filename and the modification date. Usually you can select to replace everything, replace older items with the same name, or replace nothing with the same name. Unless you're doing something specialized there's probably no check for binary equivalence.

What Lindley said. It will give you the total file number, but it's only copying the ones that aren't in the destination folder when it checks. It doesn't know that until it gets to them so it gives the total.

It said 30,000 files to copy, 143GB, 5 hours remaining.

I know what I saw. As 12,000 files were already in there it shouldn't have said what it said.

Sure it should. It sees 30000 files in the starting folder, it needs to process all of those. As it progresses it may figure out that some of them don't actually need to be copied, but it doesn't know that up front. (It could check the destination first, but for efficiency reasons it doesn't.) This is exactly what Guartho just said.

As for the estimated time remaining, I think we all know that can be wildly inaccurate sometimes. Although lately it seems like they've been doing a better job at estimating that.
 
(2) I had a project which I was backing up to memory stick. I updated some files and dragged the folder over to update the backup.

The folder I was dragging contained only the files I was updating, not the complete project.

The result was that it deleted everything else in the destination folder, leaving just those few files I had edited. There did not seem to be an option to copy a folder and overwrite files where necessary, but not delete anything unnecessarily.

You really need to be working within both folders to get these results. The computer treats a folder and its contents as a single "thing" and won't mess around with what's inside unless you make the choice to open the folder. When you drag a folder the Mac tells you it's going to replace the other folder using the word "replace."

Now, Windows works the way you're thinking...it would have merged the two folders in that situation. I prefer the Mac's way...when I'm trying to replace a folder with another folder I really do want "replace" 90% of the time. I'll open up the folders and move the files manually for the other 10% of the time when I want to merge. I think they picked the more common usage to go with as the default.

Actually...it's a funny story: Strangely enough, Windows called it "replace" too, even though it was actually merging. This was a problem for people switching to Macs...they were used to Window's "replace" meaning "merge." They'd come to Macs and find that "replace" actually meant "replace." They'd end up being mad at the Mac, but really the problem was that Windows had spent years teaching them bad English. I'm not sure if Windows 7 still has this little oddity in place or if they finally changed it to say "merge" when you try to overwrite folders. This story was from back in the XP days.
 
I prefer the Mac's way...when I'm trying to replace a folder with another folder I really do want "replace" 90% of the time.

That's interesting, because I feel the opposite way.

If we're talking about a handful of files, I'd find replace acceptable as the default copy operation, but it would be easy for me to drag-drop those few files individually.

When I'm dealing with larger numbers of files, perhaps with nested subdirectories, 90% of the time I want a copy operation to merge (replace existing files; delete nothing unnecessarily).

Most of my bigger copy operations are adding new files to an existing set, (eg, updating a backup) and copying data in several stages, such as over several days, or from several discs into a single destination.

Having to delve inside and handle each subfolder separately would be a nightmare. How would you approach something like that?

I do agree that merge would be a better word to use than the ambiguous copy. I see no reason why a right-click copy operation can't offer both options, or the OS could make the default left-click copy operation be user configurable.
 
Having to delve inside and handle each subfolder separately would be a nightmare. How would you approach something like that?

Personally? cp -r. But I'm not sure what I'd do if restricted to the drag-and-drop interface.

I do agree that merge would be a better word to use than the ambiguous copy. I see no reason why a right-click copy operation can't offer both options, or the OS could make the default left-click copy operation be user configurable.
What is this right-click you speak of.... :devil:

Actually, it still strikes me to this day as a bit odd that Windows uses the "cut/copy/paste" mechanism as a way to move files around. Selecting files I need and saying cut just makes me nervous. If I want to move files and I don't want to pull out a terminal, I'll just drag them.
 
If you are not already a member then please register an account and join in the discussion!

Sign up / Register


Back
Top