This is not an allowed function/method in forms designed in LC. Adobe did not included this functionality(File system Object) with the package as it can pose threat to personal information. If you have no alternatives search and learn about "Trusted Function" and the scope of this is limited and the config.js file needs to be updated on every machine that you intend to use your form other wise you will run in to similar issues.
Good Luck,