Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

string -CSV file-

Hi,

I have currently a question about the use of the string function. I need only a string of a CSV file for my evaluation filename.

Instantaneous,  I`m requesting the filename with this command: MID(File_Name,21,1) as drive.

The title of the CSVFile is created like this: \\000\BND$;"20,20" or \\003\Share_BND;"64,21". I only need the string "BND $" and "Share_BND" for the filenames.

Has anybody to make one`s point for me to  solve this riddle?;)

Thanks and have a nice weekend!

Greetings Greg

2 Replies
swuehl
MVP
MVP

There are multiple possible approaches, depending on the possible file names you get.

Have a look at the String functions in QV help,there are a lot of useful functions for extraction.

For example, here are two ways to get your result:

LOAD *,

  TextBetween(Filename,'\',';',3) as Result1,

  SubField(SubField(Filename,'\',-1),';',1) as Result2;

LOAD * INLINE [

Filename

\\000\BND$;"20,20"

\\003\Share_BND;"64,21"

];

Not applicable
Author

Hi Swuehl,

thanks for your quik answer. I will try your advise. Call you later, if it works..