Page 1 of 1

Stupid Newbie q about creating folder on Mac

Posted: Tue Mar 30, 2010 11:35 am
by 2Phat
Hi All
I am new...
On a Mac
I am trying to create a folder in my Home folder that is derived from a field value and cannot get it right.
the folder's name should be:
$HOME/field "Date"/field "Artist"

I tried 100's of ways and cannot get it right -

Many thanks
Stef

Re: Stupid Newbie q about creating folder on Mac

Posted: Tue Mar 30, 2010 11:41 am
by Klaus
Hi Stef,

there are two ways :)
The trick is to create the correct path from the string first!

1. The longer one:
...
put $HOME into tHome
put fld "Date" into tDate
put fld "Artist" into tArtist
create folder (tHome & "/" & tDate & "/" & tArtist)
...

2. The shorter but less readable one:
...
create folder ($HOME & "/" & fld "Date" & "/" & fld "Artist")
...

Best from germany

Klaus