Wikipedia:Reference desk/Archives/Computing/2012 December 24
Computing desk | ||
---|---|---|
< December 23 | << Nov | December | Jan >> | December 25 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
December 24
[edit]Sorting photos into folders by creation date
[edit]I have thousands of photos in several dozen arbitrary subfolders under "My Photos" on a Windows 7 PC. Is there a way to copy/move them into folders arranged by the date the photo was originally taken? I know one can view them sorted like that but I want them to actually be physically located in separate folders for each date. Roger (talk) 09:51, 24 December 2012 (UTC)
- Be pretty easy to script from most any Unix environment. ¦ Reisio (talk) 17:33, 24 December 2012 (UTC)
- OP is on Windows 7 though. 92.233.64.26 (talk) 19:17, 24 December 2012 (UTC)
- You don’t say! :p ¦ Reisio (talk) 03:01, 25 December 2012 (UTC)
- Windows has Windows Scripting Host with VBScript and Javascript preinstalled, and Windows PowerShell. But I've never gotten around to learning any of those. I'm willing to write you a Python script, but you'd have to install Python (and PIL or some equivalent if you want to use the EXIF date). -- BenRG (talk) 19:50, 24 December 2012 (UTC)
- If we can assume each file's last modification date is good, you can do this:
- 1) Move them all into a single folder, and create the new folders you want.
- 2) Use the "Details" option when listing them all (let us know if you don't know how).
- 3) Pick on "Date modified" to sort by that date.
- 4) Select the first file in a range you want, by clicking on it.
- 5) Select the last file in the range you want, by holding shift down as you click on it.
- 6) Drag and drop the selected group to the desired folder.
- 7) Repeat steps 4-6 until all files have been moved.
- 8) Delete any extraneous folders. StuRat (talk) 20:31, 24 December 2012 (UTC)
- Perhaps some of the photo management software (lightroom, nikon transfer,...) could do this!? bamse (talk) 22:56, 24 December 2012 (UTC)
- A simple method I just whipped up in five minutes, assuming you are going to move all of the images into the same folder together, that the "last modified" date is the "picture taken date" retrieved from the camera (it is with my digicam), and that you have a recent version of Microsoft Excel:
- 1) In Command Prompt, dump a bare list of the files with "dir /A:-D /b /o:d > dates1.txt", then dump a normal list with "dir /A:-D /o:d > dates2.txt". In dates2.txt, remove the first five lines ("Volume in Drive C", directory name).
- 2) In Excel, paste "dates2.txt" in Column A, then paste "dates1.txt" in a few columns away (I chose J). I began a few rows down, in Row 4.
- 3) In Excel: Assuming your text dump is like mine, the dates are first. Since Windows doesn't support "/" in filenames, we have to get them out. You can either do:
- 3a) Find-replace on "/" to remove them, then put the formula "=LEFT(A4,10)" in Column H.
- 3b) Use the formula "=MID" to grab the dates and put them into Columns E, F and G ("=MID(A4,7,4)", "=MID(A4,1,2)", and "=MID(A4,4,2)"). If you want a different date format (e.g., "yyyymmdd"), use =CONCATENATE to combine the dates in the order you want ("=CONCATENATE(E4,F4,G4)"). The resulting date is in the next column over (H).
- 3) In Excel: Assuming your text dump is like mine, the dates are first. Since Windows doesn't support "/" in filenames, we have to get them out. You can either do:
- 4) Concatenate up a "make directory" command with the dates you've got in Column M: "=CONCATENATE("md ",H4)". Column M should now have text looking like "md [date]". Do the same for a move command in Column O: "=CONCATENATE("move ","""",J4,""" ",H4)". Column O should now have text looking like <"move "[file]" [date]">.
- 5) Click and drag to highlight Cells E4 through H4. A black square should be in the bottom right of the highlight box; drag that down until it comes to the end of the file list in Column J. Do the same thing to M4 and O4.
- Assuming you did it right, the Excel file should look like this now (of course with your files instead, and the columns all lining up):
04/27/2012 15:40 16 ATO.txt 2012 04 27 20120427 ATO.txt md 20120427 move "ATO.txt" 20120427 05/01/2012 14:42 349 Chi.txt 2012 05 01 20120501 Chi.txt md 20120501 move "Chi.txt" 20120501 07/13/2012 09:04 15 ke.bat 2012 07 13 20120713 ke.bat md 20120713 move "ke.bat" 20120713 07/23/2012 08:13 20 d.bat 2012 07 23 20120723 d.bat md 20120723 move "d.bat" 20120723
- 6) Copy Column M (the ones beginning with "md") to the clipboard, then save it as "makedir.bat" in the folder with the pictures. Execute it, and the folders will be created.
- 7) Copy Column O (the ones beginning with "move") to the clipboard, then save it as "movepics.bat" in the folder with the pictures. Execute it, and the files will be moved to their respective folders.
- 8) That's it!
- Basically, what this is doing is getting the "last modified" date of your files, creating only the directories with those dates, then moving the files to those directories. -- 143.85.199.242 (talk) 19:10, 26 December 2012 (UTC)
- Thanks for all the suggestions so far. The sorting must be according to the creation date in EXIF - which Windows 7 can read as it is a sort option in Windows Live Photo Gallery. Manually moving the files is exactly what I want to avoid - there are several tens of thousands of photos dating back about a decade so manual sorting and moving would probably take all my spare time for several weeks to complete. Running a VB or Java script overnight would probably be the ideal solution. Roger (talk) 11:31, 27 December 2012 (UTC)
- I found a few free utilities that claim to do photo sorting - I'll give a few of the most likely looking ones a try. Roger (talk) 11:50, 27 December 2012 (UTC)
- In my batch-file-creation-with-Excel example above, if you want to sort by creation date (which might still be the day/time that you took it), simply add "/t:c" to the "dir" commands in Step 1; now the step looks like this:
- 1) In Command Prompt, dump a bare list of the files with "dir /A:-D /b /o:d /t:c > dates1.txt", then dump a normal list with "dir /A:-D /o:d /t:c > dates2.txt". In dates2.txt, remove the first five lines ("Volume in Drive C", directory name)."
- There you go! -- 143.85.199.242 (talk) 15:30, 27 December 2012 (UTC)
- In my batch-file-creation-with-Excel example above, if you want to sort by creation date (which might still be the day/time that you took it), simply add "/t:c" to the "dir" commands in Step 1; now the step looks like this:
1920x1200 monitors -- how good is the rendering at that resolution
[edit]I was considering getting an external monitor for my laptop so I could have two screens, and I find that it is difficult anymore to find 4:3 monitors at a reasonable price, which I think is too bad — 16:9 is great for movies but not so great for writing code.
So to get 1200 vertical pixels at a decent price I seem to need to go to 1920x1200, which gets lots of hits. But then when I look a little deeper, it appears that these are natively 1920x1080 for 1080p HD (that's again 16:9).
So what happens if I get one of these monitors and try to run it at 1920x1200 resolution? Does the picture appear "stretched"? How well does text render in the vertical dimension? --Trovatore (talk) 12:20, 24 December 2012 (UTC)
- Actually, now it looks like my searches for 1920x1200 were just popping up a lot of 1920x1080 results. The 1920x1200s are more expensive.
- So maybe my question is, can anyone recommend a decent monitor, not outrageously expensive, with at least 1200 vertical pixels? I don't really care about horizontal within reason (meaning I don't want to turn it 90 degrees and go down to 1080 horizontal, but I would accept 1600x1200 or above). --Trovatore (talk) 12:37, 24 December 2012 (UTC)
- You could try a refurbished HP LP2065 (20", 1600×1200, S-IPS or VA, matte) for around $100 on eBay. Another option is the off-brand Korean 27" 2560×1440 IPS glossy monitors that are currently going for about $300 new on eBay. However they only support dual-link DVI, which might require an active adaptor (~$100) or a docking station (price varies) to work with your laptop. Some laptops don't support 2560×1440 at all. Prices may vary wildly if you're not in the US. -- BenRG (talk) 18:19, 24 December 2012 (UTC)
- I use 1920×1200 when writing code. I can have multiple windows open, with each overlapping window being 1600×1200. If you look at a monitor at a store, be sure to ask them to bring up some text on it, so you can see how well text is rendered (even if the monitor isn't connected to a computer, you can still bring up the on-screen controls on most, so long as they have power, and that text is a good test). StuRat (talk) 19:15, 24 December 2012 (UTC)
- Since HD became the standard it has become difficult to find anything at a higher resolution. I know I've done higher vertical resolutions on old CRT displays, and I had a 1600x1200 laptop back before anyone was talking about 1080p, but you can't find those anymore. It takes some getting used to, but I have 2 1920x1080 monitors mounted vertically (portrait mode) for writing code. They are a little narrower than I would like sometimes, but the huge amount of vertical space can be great. I use a program that lets me do something like Aero snap for the top and bottom halves. It's something to think about as an alternative to paying an arm and a leg for a tiny bit more vertical resolution on your second monitor. The main visual issues I have are that off-axis viewing is worse (only an issue when showing someone else something) and for some reason sub-pixel font rendering can't handle the fact that my pixels are sideways. 209.131.76.183 (talk) 17:43, 26 December 2012 (UTC)