LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan From String Assistance

Hey NI Crew,

Here's a simple one for ya. I'm trying to use the Scan From String to dig through a bunch of data files to find the appropriate files.  I can do it to a certain point.  I'm looking for files that are identified as Passed but also have the .txt extension.  The .txt extension is causing this to not work.  I remove it, and I get all the passed files, but every different type of extension.  What's the magic trick here?  Using LabVIEW 2009, fyi.  So don't send me any VIs beyond that please.

 

DailyDose_0-1634225309767.pngDailyDose_1-1634225345186.png

 

0 Kudos
Message 1 of 5
(252 Views)

Apply the file extension to the "pattern" input on the "recursive file list" block.

 

Have fun.

 

0xDEAD

 

 

edited to add: In your case "pattern" would be *.txt

Message 2 of 5
(250 Views)

@deceased wrote:

Apply the file extension to the "pattern" input on the "recursive file list" block.

 

Have fun.

 

0xDEAD

 

 

edited to add: In your case "pattern" would be *.txt


If the standard wildcards work then a pattern like ?Passed.txt might work better

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 5
(232 Views)

Hmmm... I mean sure if you wanted to do it the easy way. LOL

 

Thank you.

Message 4 of 5
(229 Views)

If you wanted to keep with the Scan From String, you need to use "%[^.]" instead of "%s".  The bracket notation looks for specific characters and the ^ states not the next character.  To this will take all characters up to the period.  The normal %s looks for a white space to stop the scan.

 

But the super easy method is to use the Recursive File List.vi and use "Passed_Report_*.txt" as your pattern.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(215 Views)