Jump to content

Network fileread/fileexist issues


Recommended Posts

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"))

 

Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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"))
Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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?

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...