LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

MakeDir Succeeds, but GetFileInfo immediately after

I called GetFileInfo to determine if a directory existed and it did not. I then created several directories, one below another, successfully with MakeDir. I then called GetFileInfo on the directory and got an exception saying access to the file was denied. This is all in 1 program run. I can see the directory get created with Win Explorer. Why am I being denied access to the directories?
0 Kudos
Message 1 of 4
(3,074 Views)
Not really sure, but did you look at the permisions on the directory created?

What's the permissions of the user logged in running the program?

I am assuming CVI used the logged in use permissions to do theses tasks.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 4
(3,066 Views)
I figured it out. Dumb Mistake specifying the directory name. The permissions were fine.

Thanks.
0 Kudos
Message 3 of 4
(3,057 Views)
The other issue was that I should have been using FileExists(), NOT GetFileInfo(). Seems bizarre. Oh Well.
0 Kudos
Message 4 of 4
(3,050 Views)