LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

outputing a dir listing for use as a file sorter

hi all
i was working on using an external *.exe to encode some data and i
need to take a dir listing in so that i can apply the encoding to
certain files, but i am having a little diffuculty in in outputting a
text file from which to scan, i have
i am using labview 6, and the main vi elements i'm using for this
proccess is the list dir vi index array vi and write chars to a file
vi, but i cannot get the file names on a new line for each one, they
are all after each other with one space....
i know in text based programing you can use \n or similar to solve
this, but i am at a loss here with labview
if any one could help i would be most grateful
peter
0 Kudos
Message 1 of 4
(2,798 Views)
Peter,
Here is a VI that does what you want. Basically, it uses the function Spreadsheet array to String to get the text string (with the file names) with line feed as a delimiter. This string is then written to a text file.

I hope this helps. /Mikael Garcia
0 Kudos
Message 2 of 4
(2,798 Views)
> i was working on using an external *.exe to encode some data and i
> need to take a dir listing in so that i can apply the encoding to
> certain files, but i am having a little diffuculty in in outputting a
> text file from which to scan, i have
> i am using labview 6, and the main vi elements i'm using for this
> proccess is the list dir vi index array vi and write chars to a file
> vi, but i cannot get the file names on a new line for each one, they
> are all after each other with one space....
> i know in text based programing you can use \n or similar to solve
> this, but i am at a loss here with labview
> if any one could help i would be most grateful


The string palette has constants for different linefeed, carriage
return, or the platform adapting en
d of line. If you add this
string character between names, that should get you started.

Greg McKaskle
0 Kudos
Message 3 of 4
(2,798 Views)
many thanks! i don't know how i could have missed that! 🙂


"Greg McKaskle" wrote in message
news:3C22A8B2.8020709@austin.rr.com...
> > i was working on using an external *.exe to encode some data and i
> > need to take a dir listing in so that i can apply the encoding to
> > certain files, but i am having a little diffuculty in in outputting a
> > text file from which to scan, i have
> > i am using labview 6, and the main vi elements i'm using for this
> > proccess is the list dir vi index array vi and write chars to a file
> > vi, but i cannot get the file names on a new line for each one, they
> > are all after each other with one space....
> > i know in text based programing you can use \n or similar to solve
> > this,
but i am at a loss here with labview
> > if any one could help i would be most grateful
>
>
> The string palette has constants for different linefeed, carriage
> return, or the platform adapting end of line. If you add this
> string character between names, that should get you started.
>
> Greg McKaskle
>
0 Kudos
Message 4 of 4
(2,798 Views)