Jump to content
Sign in to follow this  
BatMan22

Network fileread/fileexist issues

Recommended Posts

BatMan22

So for some reason I'm getting an a 0 returned for Fileexists in my main program... Anyone know what is going on?

When I map the drive and run the code below, it returns a 1 value so it works correctly.

Local $iFileExists = FileExists("X:\MacroShare\IC3A.txt")
                MsgBox(0, 0, "This file's existence is: " & $iFileExists)

When I run the code below in my main program..  SOMETIMES it claims it doesn't exist, and SOMETIMES it works just fine.. Sooo.. help?

MsgBox(0, 0, "This file's existence is: " & FileExists("\\Ic2\public\MacroShare\IC3.txt"))

 

Share this post


Link to post
Share on other sites
JLogan3o13

Soooo....what account are you running it under? Does it have access to that location? Running against my server it works just fine:

MsgBox(0, "", "This file's existence is: " & FileExists("\\LC-SERV01\Public\Testig\Putty\LIS.CMD"))

But I am running it under an account that has access.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
BatMan22

I don't know which account autoit uses generally, but I included #RequireAdmin. And still it seems random as to what I get for the MsgBox error, I swear it's random. How do I check to see if the program has the required rights? 

MsgBox(0, 0, "This file's existence is: " & FileExists("\\Ic2\public\MacroShare\IC3.txt"))

Share this post


Link to post
Share on other sites
JLogan3o13

When you run it with #requireAdmin, do the credentials you're supplying have access to that network folder?

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
BatMan22
3 minutes ago, JLogan3o13 said:

When you run it with #requireAdmin, do the credentials you're supplying have access to that network folder?

Yes it did, but apparently I'm crazy because for whatever reason.. it works now. I'm included admin checks from the thread below.. seems ok now, turns out I just must not have had admin access?

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×