How do I use "touch -t" to shift a batch of JPG timestamps by one hour?

I'm trying to use "touch -t" to shift a batch of JPG created/modified timestamps by one hour to fix a time zone error. Is this possible?
(I don't want to have to manually go to every file, and enter its current timestamp all the same way except for the month.)
By the way, does using the "touch" command have the same JPG lossy effect as saving the file again?

picky picky picky
So you write a script that uses stat to get the current modification time and then add 60 minutes to it, with the date command, then then use that with touch against the file. Nothing to it
#!/bin/sh
find starting.directory -name "*.jpg" | while read file
do
ls -l "$file"
mtimeinsec=$(stat -f %m "$file")
mtimeplus_1H_in_touchfmt=$(date -j -r $mtimeinsec -v +1H +%G%m%d%H%M.%S)
/usr/bin/touch -t $mtimeplus_1H_in_touchfmt "$file"
ls -l "$file"
done
I've added an hour to the modification time. If you want to subtract an hour the +1H to -1H
If you want to use shell wildcard selection modify the loop to be something like
#!/bin/sh
for file in *.jpg
do
... the guts of the above while loop ...
done
If you just want to provide a list of files, you can change the *.jpg to a list of files. JUST BE CAREFUL OF SPACES IN FILE NAMES and directories
If you want a drag and drop application, you can do that with some additional changes and either using Applications -> Automator with the "Run Shell Command" or using Platypus (free download, and a very nice utility). The script would change to:
#!/bin/sh
for file in "$@"
do
... the guts of the above while loop ...
done
I have tested the very first script. I am fairly confident my 2nd to examples are right, but they are untested, so your mileage may vary.

Similar Messages

  • How do i use my mac book with my HP 6510 e all in one series printer

    how do i use my mac book with HP photosmart 6510 e all in one series

    Hello Marilynatsea,
    Thanks for using Apple Support Communities.
    To learn more about printing in OS X on your Mac, and how to add a printer, take a look at the article linked to below.
    Mac Basics: Printing in OS X - Apple Support
    Cheers,
    Alex H.

  • How can i use another icloud account in my iphone? can i pay one?? where?

    how can i use another icloud account in my iphone? can i pay one?? where?
    My phone has reached the maximum number of free accounts activated where can I buy one to use?

    You can't buy another one.  You have to reuse one of the accounts previously set up on your phone, or create a new one to use on another iOS device (running iOS 5 or higher) or Mac (running OS X 10.7.2 or higher), if you have one.

  • How can you use iMessage between 3 iPads with 3 different users but only one Apple ID?

    how can you use iMessage between 3 iPads with 3 different users but only one Apple ID?

    No you do not need separate Apple ID's in order to use 3 devices with one Apple ID. I use 4 devices to Message and FaceTime and all use the same Apple ID. You do need to add additional email addresses for the other devices.
    Look at this very informative video for the instructions.
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l

  • How do I use Time Capsule as a wireless router and turn my current one into modem only

    I have a crappy modem/ router and before I purchase a new modem I want to use the modem (no wireless) feature of my router.
    Question #1
    How do I use my Time Capsule as a router?
    Question #2
    If I do this will I still be able to wirelessly back up to my Time Capsule?
    Question #3
    How do I turn off (wireless) or the router function of my modem/ router?
    Question #4
    I then want to connect all my wireless devices to my Time Capsule making that
    the main WIFi in my house. I am assuming this is possible it is I just dont know how to go about doing this myslef without guidance, and the Airport Installer is confusing to me.
    Thanks!

    Question #1
    How do I use my Time Capsule as a router?
    Connect an Ethernet cable from one of the LAN <-> ports on your modem/router to the WAN port (circle of dots icon) on the Time Capsule.
    Open AirPort Utility and click Continue to follow the guided setup to  configure the Time Capsule to "create a wireless network".  Select the "Bridge Mode" option when it appears during the setup. (AirPort Utility will normally do this for you)
    Question #2
    If I do this will I still be able to wirelessly back up to my Time Capsule?
    Yes
    Question #3
    How do I turn off (wireless) or the router function of my modem/ router?
    We prefer not to guess at things, but since we do not know the make and model number of your modem/router, and this is an Apple support area, we have little choice.
    In general, you would enter the default IP address of the device into your browser to bring up the configuration pages (check your documentatio on the modem/router for this information, or it may be on the back or bottom of the device. An example of a default IP address is something like 192.168.1.254
    There will be a wireless settings page that will allow you turn off the wireless function of the device.
    If you acquired the modem/router from your service provider, they should be able to tell you how to do this as well, or if you check the manufacturer's website, they will likely have a support area for questions like this.
    Question #4
    I then want to connect all my wireless devices to my Time Capsule making that
    the main WIFi in my house.
    You will need to log on to the Time Capsule wireless network from each device and enter the password to connect. Most computers will "remember" the setting so that you do not have to enter the password each time that you connect.

  • How can I use my Zen Xtra like a flash memory

    Hello, I want to know how can I use my MP3 player like a flash memory.
    I have one and if I conect it with other computers I can't transfer documents and with a flash memory I conect it in all the computers with Windows XP and all of they detect the flash memory and they can transfer documents.
    With my Zen Xtra I connect it and the computer detects it but I can't transfer anything because the computer doesn't have the software.
    My question is.. Do I have to install the software in all the computers that I use ? or there are other forms to conects PC and MP3 Player? ( I want to transfer documents like text, image, etc)

    But some MP3 players do that, why this one can't be connected with all the computers ?
    Message Edited by morfo on 0-22-2005 05:54 PM

  • How can I use a firewire hard drive on a new Macbook with one USB-C only?

    How can I use a firewire hard drive on a new MacBook with only one USB-C?

    kaz-k is correct about FireWire not being supported by any possible connector or adaptor to USB-C and never will.  However, there is no such thing as a FireWire Hard Drive.  There are only SATA (or if it is a really old one, ATA,) drives in a FireWire enclosure.  If you can remove the drive from the case/enclosure - bust it open somehow if it is a glued-up unit - then the drive can be placed into a regular USB3 enclosure. Then it can connect to the new MacBook via any one of the adaptors Apple sells.

  • Hi how can i use imessage from my mac

    hi how can i use imessage from my mac , i tried to text message to one of my contact name but it said the number is not registered with imessage so how can i registered all my contacts to the imessage . thanks

    The person you try to contact has to register his number/his appleID with iMessage.

  • How do i use 2 ipod touches with 1 itunes account?

    how do i use 2 ipod touches with 1 itunes account?  can they share apps and music etc. I'm not very good at any tech so advise would be much appreciated.

    Yes. You can sync an unlimited number of iDvies that you control to one iTunes library/account. If using the same iTunes library on the same comutr just make sure that yu go to the ap. music and other pane for the iPod in iTunes and select sycn selected items. Not the the whole library.  That way each iPod can have it own contents.

  • How do I use my apple bluetooth keyboard with touch and will I still be able to use it with my ipad?

    How do I use my apple bluetooth keyboard with touch and will I still be able to use it with my ipad?

    iPod touch User Guide (For iOS 4.3 Software)

  • How do I use iMessage between an iPhone & an iPod Touch?

    How do I use iMessage between an iPhone & an iPod Touch?

    Set up iMessage on both devices and when th touch has wifi you can iMessage to it

  • How do you use the 2nd gen ipod touch as a hard drive?

    I restored it and renamed it because my sister gave it to me, and now I restored it to use it as my own, and it works fine and all, occasionally saying it can't sync some applications and movies because it can't find the file or something, and I've tried removing all my music (which is like, 5.5 GB total) and it still has those same errors. The other thing I have a problem with, as the subject implies, how do I use it as a hard drive? I've seen the tutorials on apple, but I don't see the "enable disk use" on itunes in the XXXXX's ipod summary tab.

    The iPod touch doesn't have the "enable disk use" option of other iPods.
    A program called AirSharing will let you mount the iPod touch as a wireless drive
    http://www.itunes.com/app/airsharing

  • How can I use my iPod Touch as a voice recorder?

    How can I use my iPod Touch as a voice recorder for long recordings, like 45 minutes? Is ther an app for that?
    I believe I have a Gen 4, but there are no identifying marks on or in it.
    Thanks

    Use the built-in Voice Memos App. That si covered i the Manual
    manuals.info.apple.com/MANUALS/1000/MA1657/en_US/ipod_touch_ios6.1_user_guide.pd f

  • My friend gave me ipod touch with all his accounts, i created new accounts but when i went on the appstore and tried to update apps installed by him,i was asked his account's password! i dont know his password.how can i use my account to update apps?

    my friend gave me ipod touch with all his accounts, i created new accounts but when i went on the appstore and tried to update apps installed by him,i was asked his account's password! i dont know his password.how can i use my account to update apps?

    You can't.  Apps and really all content purchased/downloaded through one Apple ID is forever tied to that Apple ID.  In the case of Apps they will always request that Apple ID to update as they are licensed to that Apple ID.
    In reality, the Apps were licensed to that Apple ID by the developer.  And cannot simply be given away to you for you to use.
    He should have wiped the iPod clean so you could set it up for your use without any of his accounts or purchased content as you are not really licensed to any of those Apps.
    Your friend should have followed this support document before giving the iPod to you:
    What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support

  • HT4145 How can I use an Airport Extreme to act as a Range Extender for an Alcatel One Touch Y800Z WiFi modem/router? I get a message saying it cannot be extended. Thank you. Arup

    How can I use an Airport Extreme to act as a Range Extender for an Alcatel One Touch Y800Z WiFi modem/router? As we live in a rural area and our landline broadband speeds are awful, I have moved on to a 3G provider in the UK (EE/Orange) and set up the wireless modem which is working very well with an iMac. I have an Airport Extreme base station which was previously connected with an Ethernet cable to the landline router, and two Airport Express stations as Range Extenders. I would now like to use the Airport Extreme and the two Express stations to extend the range of the Alcatel WiFi device. I have tried automatic and manual set up with the Airport Utility but at the crucial step for selecting a network to extend, although the WiFi device is recognised, I get a message saying it cannot be extended.
    Thank you for any help you can provide.
    Arup

    This is a problem with a lot of cheap end wifi hotspot like devices.. sometimes you can just swap the sim out to a real 3G wireless router.. that is a better approach IMHO than wireless repeater ever will be.
    In the meantime..
    Have a go with the suggestion.. place the express as wireless bridge. With a computer connected to the wifi from alcatel unit.. (I am amazed Alcatel still are in domestic market.. I thought they sold out). Set the express to join the wifi.. you do this in the airport utility.. old one is easy.. but in v6 you have to trust to luck so to speak and hope the auto setup works.. tell us if you have trouble.
    With the Express bridging.. you can then plug it by ethernet into the TC.. which will be in router bridge..
    ie
    You can then run the connection from wireless or ethernet on the TC.. and it will relay back to the alcatel for internet.. all a bit dodgy but who knows.. it may give you what you need.
    Wireless repeater is never particularly reliable in my experience. I would avoid it if possible.

Maybe you are looking for