Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 26, 2009, 02:24 PM   #1
Grahf
macrumors newbie
 
Join Date: Jun 2009
Looking for someone to help me convert a short .bat file to AppleScript

I'm not very savy in programming, but its a relatively short code so hopefully someone can help me out. Anyways:

Code:
rename sonny-2.swf sonny-2-ver-2-2.swf
rename sonny-2-ver-1-1.swf sonny-2.swf
Code:
rename sonny-2.swf sonny-2-ver-1-1.swf
rename sonny-2-ver-2-2.swf sonny-2.swf
Grahf is offline   0 Reply With Quote
Old Jun 26, 2009, 02:27 PM   #2
iShater
macrumors Demi-God
 
iShater's Avatar
 
Join Date: Aug 2002
Location: Chicagoland
Are those two different bat files? cause the 2nd code block reverses what the first one does.
__________________
Insert signature here.
iShater is offline   0 Reply With Quote
Old Jun 26, 2009, 02:29 PM   #3
Grahf
Thread Starter
macrumors newbie
 
Join Date: Jun 2009
Yes, they are. Sorry I didn't specify.
Grahf is offline   0 Reply With Quote
Old Jun 26, 2009, 02:37 PM   #4
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: USA
Instead of rename, use mv.
angelwatt is offline   0 Reply With Quote
Old Jun 26, 2009, 02:39 PM   #5
Grahf
Thread Starter
macrumors newbie
 
Join Date: Jun 2009
Is the period part of the code or just a period? :P
Grahf is offline   0 Reply With Quote
Old Jun 26, 2009, 03:43 PM   #6
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: USA
Quote:
Originally Posted by Grahf View Post
Is the period part of the code or just a period? :P
It's just a period. mv short for move.
angelwatt is offline   0 Reply With Quote
Old Jun 26, 2009, 04:17 PM   #7
poppero
macrumors member
 
Join Date: Jun 2009
you can find an example of what you need directy in the AppleScript's Examples Script folder in your Applications/AppleScript/Example Scripts/Finder Scripts directory.
poppero is offline   0 Reply With Quote
Old Jun 26, 2009, 04:53 PM   #8
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: USA
I apparently missed the last word of the title on this thread. The mv command I gave is for the command line, but can be used in AppleScript as well doing like so,
Code:
do shell script "mv old.name new.name"
angelwatt is offline   0 Reply With Quote
Old Jun 27, 2009, 12:40 AM   #9
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
Is that the entire code? Because if so it hardly seems worth scripting...
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Convert Applescript to Xcode Project omgitssum1 Mac Programming 3 Feb 26, 2014 02:57 AM
Trying to Convert nvAlt text file to MS Word .doc file thelucas Mac Applications and Mac App Store 2 Apr 8, 2013 07:59 PM
Apple BT Keyboard - 2 Bat. vs 3 Bat. Version? Tucom Mac Peripherals 3 Dec 8, 2012 05:23 PM
Convert Automator Flow to AppleScript?? CyXBeAtZ Mac Programming 6 Sep 5, 2012 11:35 PM
Run .exe files on a bat file? Ryukouki Windows, Linux & Others on the Mac 5 Aug 28, 2012 02:22 AM

Forum Jump

All times are GMT -5. The time now is 01:24 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC