Currently Being ModeratedNov 16, 2012 6:46 AM (in response to smiley_cedric)
To do this in applescript use the path to command from the StandardAdditions osax.
set documentsPath to path to documents folder from user domain
tell application "Finder"
set some_file to some file of folder "Français" of documentsPath
The first line gives a machine-independent path to the documents folder, then all you have to do is ask the finder to find your folder inside tha foldert.
Currently Being ModeratedNov 16, 2012 9:33 AM (in response to smiley_cedric)
tw has the correct answer to your question - using the 'path to' command to find a system-independent way to locate standard directories on your system.
Your question leads to a wider issue of combining strings and variables, so I figured I'd address that.
Your original script uses a literal string, which is why it ignores your variable - imaine the problems you'd have if AppleScript automatically substituted your strings just because part of the string matches a variable name.
In order to combine strings and variables you need to use: & (concatenate)
Consider this script:
set myUsername to short user name of (get system info)
display dialog "Good Morning, myUsername"
display dialog "Good Morning, " & myUsername
The first line creates a variable, myUsername, based o the system info.
Then the second line displays the literal string "Good Morning, myUsername"
The last line combines the string "Good Morning, " with the value of the variable, and gets you what you want.