$ 0 0 You need the full path if it relative to the script you can get the scripts path alert(File($.fileName).parent.fsName);