Re: Replace Colon with Forward Slash
Re: Replace Colon with Forward Slash
- Subject: Re: Replace Colon with Forward Slash
- From: Rick Dwyer <email@hidden>
- Date: Tue, 15 Jul 2008 12:51:07 -0400
Thanks Jay and Michelle.
That gets me closer... but an unanticipated problem is that my path
name has spaces in it (/Library/Application Support/Directory 1) which
won't fly in as a path in my shell script. I believe I can escape
spaces using the \ but how do I do this in AppleScript to the
resulting POSIX path variable?
Thank you again.
Rick
On Jul 15, 2008, at 12:10 PM, Michelle Steiner wrote:
On Jul 15, 2008, at 8:57 AM, Rick Dwyer wrote:
HardDrive:Library:Directory1:Directory2: etc.
I need to convert the returned string into a more terminal friendly
string such as:
/Library/Directory1/Directory2/
Is there an easy way to eliminate the hard drive name from the
beginning of the string and replace the colons with forward slashes?
Yes, very easy.
POSIX path of "HardDrive:Library:Directory1:Directory2:"
--> "/Library/Directory1/Directory2/"
This assumes that "HardDrive" is the actual name of the drive.
-- Michelle
--
Please contribute to the Leukemia and Lymphoma Society, and help me
meet my fund raising goal for my marathon training.
<http://www.active.com/donate/tntdms/tntdmsMSteine>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
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