image
image

Go Back   macosx.com > Scripts > Apple Scripts

Reply
 
Thread Tools
  #1  
Old March 16th, 2008, 01:17 PM
Mikuro's Avatar
Crotchety UI Nitpicker
 
Join Date: Mar 2005
Posts: 2,414
Mikuro is on a distinguished road
[AppleScript] Duplicate files with timestamp

Here's a script I just wrote today. It duplicates the currently selected files in the Finder, and then puts a timestamp in the name of the duplicates (instead of the generic "copy"). The timestamp uses a long date format that is properly sortable as plain text in any program: YYYY-MM-DD hh-mm-ss

For example, if you load the script with "MyFile.txt" selected at 2:15 PM, the duplicate will be named something like "MyFile 2008-03-16 14-15-01.txt".

It works with any number of files and folders selected at once.
__________________
Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.2

I'm now a four-browser man. How on earth did this happen?!

Useful programs: PithHelmet, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc

Last edited by Mikuro; March 16th, 2008 at 01:29 PM. Reason: Changed file format from ".script" (compiled) to ".applescript" (text)
Reply With Quote
Reply

Tags
applescript, duplicate, finder, script, timestamp

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 04:50 PM.


Mac Support® Version 3.7.0 Beta 5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.