views:

49

answers:

2

set fold to "/Users/Test/Desktop/" set file to "/Myfolder/Hi.txt"

how to join these two variables to get my file path as "/Users/Test/Desktop//Myfolder/Hi.txt"?

+1  A: 

Use the ampersand operator to join strings:

set the folderPath to "/Users/Test/Desktop/"
set the filePath to "/Myfolder/Hi.txt"
set the fullPath to folderPath & filePath
sakra
this returns "/Users/Test/Desktop//Myfolder/Hi.txt" notice the double slashes you don't want that if you go with this method it will work find as long as you take out one of the slashes
mcgrailm
Thanks tat works
MAC
+1  A: 

here ya go

  set aFile to (the POSIX path of (path to desktop)) & "Myfolder/Hi.txt"
mcgrailm