Accessing files query
Posted: Fri May 02, 2014 5:07 pm
Hello All,
In this code snippet I'm trying to retrieve the second word of line 1 in my text file:
set the itemdel to "/"
put the effective filename of this stack into mPath
put mPath & "/settings.txt" into mPath
answer(mPath)
put word 2 of line 1 of URL ("file:" & mPath ) into tPath
answer(tpath)
mpath gives me the correct path to my file but tPath is always showing me and empty string.
Is the syntax for this line: put word 2 of line 1 of URL ("file:" & mPath ) into tPath
correct?
Thanks!
In this code snippet I'm trying to retrieve the second word of line 1 in my text file:
set the itemdel to "/"
put the effective filename of this stack into mPath
put mPath & "/settings.txt" into mPath
answer(mPath)
put word 2 of line 1 of URL ("file:" & mPath ) into tPath
answer(tpath)
mpath gives me the correct path to my file but tPath is always showing me and empty string.
Is the syntax for this line: put word 2 of line 1 of URL ("file:" & mPath ) into tPath
correct?
Thanks!