• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Change Creation, Modified Dates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Change Creation, Modified Dates


  • Subject: Change Creation, Modified Dates
  • From: Marconi <email@hidden>
  • Date: Sat, 9 May 2009 07:58:45 -0700

Given two files, one a '.mpg' and the other named identically plus '.txt' I need to read the first line of the txt file and find the date there, then change the creation and modification dates of both files -- the mpg and the txt -- to that date.

So, I'm trying to cobble together a droplet to do so to file pairs.

Example file pair:

A File Name - That may contain Spaces.mpg
A File Name - That may contain Spaces.mpg.txt


The first line of the text file will be thus:

time : 2007-04-12T03:00:00Z

I need to extract the year, month and day from "2007-04-12" and then set the creation and modification dates of both files to that date. (The hours, minutes and seconds can be left as is.)

In its simplest form, I'd drag files to the droplet in pairs. A handier version would allow dropping of a folder, which it would walk, reading each text file, extracting the date then modify the creation and modification dates of the text file and its matching mpg.

I'm stumped at extraction of the month, day and year from the text file of a dropped pair.

--
'Login' is not a verb!
<http://www.otfb.com/blog/?p=907>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Change Creation, Modified Dates
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: TextEdit, delete all blank lines
  • Next by Date: Applescript + Skype Export Contacts
  • Previous by thread: Re: Applescript + Skype Export Contacts
  • Next by thread: Re: Change Creation, Modified Dates
  • Index(es):
    • Date
    • Thread