Ysengrim Posted November 10, 2007 Share Posted November 10, 2007 If I run my program on my computer it works If I run it on my website it doesn't The script is using the command "FileExists" for looking for a data-file in the same directory on my computer the command works on the website he's giving an error he can't find file I uploaded both in same directory - like it was on my harddisk command used : FileExists("data.txt") Link to comment Share on other sites More sharing options...
Developers Jos Posted November 10, 2007 Developers Share Posted November 10, 2007 If I run my program on my computer it worksIf I run it on my website it doesn'tThe script is using the command "FileExists" for looking for a data-file in the same directoryon my computer the command workson the website he's giving an error he can't find fileI uploaded both in same directory - like it was on my harddiskcommand used : FileExists("data.txt")I bet the workdir is not equal to the scriptdir when running in your website.Try FileExists(@scriptdir & "\data.txt")Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Ysengrim Posted November 10, 2007 Author Share Posted November 10, 2007 I bet the workdir is not equal to the scriptdir when running in your website.Try FileExists(@scriptdir & "\data.txt")JosThanks Jos !!!It didn't work eitherbut I got to work with the @scriptdir you mentioned and after reading the helpfiles about it I made 2 messageboxen containing the@scriptdir and the @workdiruse them on my computer harddisk they gave the results I expectedbut after putting them on my website and they gave an unexpected result : working dir = C:\Documents and Settings\MYNAMEscript dir = C:\Documents and Settings\MYNAME\Local Settings\Temporary Internet Files\Contents IE5 ........can somebody explain that or give me a better way to find a txt file to read from for my script? (in the same directory of the script)thanks a lot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now