This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I Point to a Users directory with Windows 7

Hello,

 

I am trying to have the program point to the Users directory with Windows 7 operating system. I need it to read a Data.txt file in their User folder. Any ideas would be greatly appreciated.

 

 

I tried this with no luck.

 

Thanks,

John

0 Kudos
Message 1 of 4
(2,246 Views)

Try %UserProfile%

 

I don't think you need the C:\

 

for example:

 

%UserProfile%\APSST 2012\SMR Data.txt

 

 

 

 

http://www.medicollector.com
0 Kudos
Message 2 of 4
(2,244 Views)

Hello,

 

I get an error, see attachmnent please.

 

Thanks

0 Kudos
Message 3 of 4
(2,235 Views)

You can't use %something%. %something% is a shell variable, not a substitution macro that can be used for file I/O functions. You have to pass in an absolute path to the File I/O functions. You can use the Get System Directory function to return the path for a specific directory, such as the user's home directory.

0 Kudos
Message 4 of 4
(2,230 Views)