LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File size of empty path = 9! why?

I am attaching a vi that has empty path to file info function. the vi doesnt return an error. instead it gives me 9 for the file size. why is this?

Anand.
0 Kudos
Message 1 of 10
(3,243 Views)
On my machine it returns "11".

At first I thought was default to the current folder and just telling me how many files are there.

Afeter adding another file the value remained at 11.

Not an answer, but more info.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 10
(3,243 Views)
Looking again, I have 11 drives mapped.

Check if you have a total of 9 drives perhaps.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 10
(3,243 Views)
You are right. It is returning the number of drives i have on my machine. But isnt that funny that the File/Directroy info somehow returns the number of drives when you wire empty path!

Thanks,
Anand.
0 Kudos
Message 4 of 10
(3,243 Views)
Don't know, just guessing.

May have to do with legacy (coming from the MAC) or cross platform support (UNIX).

I believe they have always hung their drives off a root.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 10
(3,243 Views)
Hi SRA,

an empty path contected to some of the File functions work on the level of the drives. If you would connect an empty path to the "List directory" function you will get all drives your machine has in the directory output. This is an undocumented feature and I don't know if this works on non-windows machines.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 6 of 10
(3,243 Views)
Ben & Waldemar were indeed correct that the number returned correlates to the number of drives on your machine. This behavior is intended although I wouldn't necessarily say expected. I have notified our R&D & documentation team so they can work on this issue and ensure there is documentation in the future for this behavior.

Matt Kisler
Applications Engineer
National Instruments
0 Kudos
Message 7 of 10
(3,243 Views)
Please do not remove this feature in the future, only document it. We have dialogs which use it.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 8 of 10
(3,243 Views)
> an empty path contected to some of the File functions work on the
> level of the drives. If you would connect an empty path to the "List
> directory" function you will get all drives your machine has in the

The empty path has to have a predictable behavior to the file functions,
and the options were -- returns an error, or does something useful.

Way back in Win31 days, it was decided that it was the desktop on the
Mac, root on unix, and the Machine on Windows. I suspect this was once
documented, but documentation needs to get trimmed from time to time,
and this was probably left on the cutting-room floor. Maybe we need the
DVD edition with all of the left out goodies put back in?

Greg McKaskle
0 Kudos
Message 9 of 10
(3,243 Views)
Now there is a DVD I'd watch.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 10
(3,243 Views)