Search files which filename contains a speicific string

Hi
I'm lookng for a way to find all files in a directory which part of filename contains a specific string.
e.g.:
string = hello
files;
- 1hello2.txt
- 22he45.txt
- gehello42353.txt, ....
The result should be either an index or the complete filename that matches. In the example I'd found index 0 and 2, or 1hello2.txt and gehello42353.txt.
Actually I have the list of the files with the "recursive list.vi".
Any suggestions are welcome.
Thanks for your precious help
Yves
Solved!
Go to Solution.

You can use List Folder - function with *hello* -pattern.
From there you get filenames, which include that specific pattern.
If you allready have list of files:
- use Scan string for tokens in a for loop and if token index != -1, then you can add that array index to the list.
I´m sure there are better ways to do this, but nothing I can come up with quickly.
Attachments:
search.png ‏16 KB

Similar Messages

  • How to upload a file which may contain text as well as image to the server using windows phone 8 application ?

    How to upload a file which may contain text as well as image  to the server using windows phone 8 application ?

    You're going to need to give way more detail about the situation before we can help.

  • Can't create file with filename contains user-defined character

    Dear all,
    I got a question about directory listing and file creation. My development OS is Win2K traditional chinese version and my JDK is 1.4.0 Internationation version.
    My program copy each of file into another directory. I call File.lists() to get an array of filename String, I then create the file in the destination directory. However, I got error while the filename contains some chararters that I created in my system only by Win2K character creation utility. I found those characters become "?" if I printf them. How could I overcome this problem? Thanks.
    ArthurPan

    The limitation here is not caused by Java at all.
    Java handles UNICODE characters, the concept of ASCII characters is only loosely retained by accident, mainly because the ASCII set is retained as is in UNICODE.
    The limitation here is the Operating System whose filesystem does not support UNICODE names. As far I as can remember, although the System default locale can be your language equivalent, the filesystem does not necessarily support UNICODE filenames even though it may actually be able.
    What you need to do is check the file.encoding property in Java and set that using the -Dfile.encoding=BIG-5 or whatever when starting your application. This may help with the file name problem.

  • Download a file which is encoded as a String

    Hi All,
         I have a file which is encoded(Base64) as a String. Is there any way in flex to  decode and download the file.
      A sample code would help me !!!!!.
    Thanks.

    Check out the mx.utils.Base64Encoder/mx.utils.Base64Decoder classes.

  • Can I open a file which name contains GB18030 character

    Hi,
    I am try to using Java to open a file in XP, the file's name contains some GB18030 character, is Java support that process?
    Thanks,

    Wouldn't it be easier just to try it?

  • Sender file adapter - filename containing  *  does not work

    Hi All,
    I am doing simple file-file scenario wherein my filename is something like
    MATMAS05_XI20070911-150159-088.xml 
    there are many files having similar kind of  name which are supposed to be picked
    so simply I can go on writing <b>MATMAS05_XI*.xml</b> in filename
    it is not working.. communication monitoring gives error <i>Error occurred while connecting to the FTP server "10.25.117.237:21": java.lang.NullPointerException</i>
    But  when I use character '?' then it works fine - '?'  placeholder for each extra character
    I am on SP 20.My adapter is configured properly. FTP server working fine with '?' or simple filename. So bit confused why it is not working with *
    Are there some BASIS settings which have to be in place to work it out with * ?
    All your inputs are welcome !!
    Thank You,
    Mugdha kulkarni

    Hi
    this error is not related to multimple files or sending with the * char.. you can use it
    see the below link
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    The error related to the server connection.. also check the ip address is correct or not you configured correctly or not..
    also clarfity the correct error description ..
    Chilla

  • Grep command to search files which have names of same pattern

    Hi,
    I am new to solaris.
    I am trying to grep all the files in a directory which have names of same pattern.
    I had done this in linux but in solaris it is not working.
    e.g. i have two files setup.log and setup.log.full
    grep -l 'setup*' *
    by this command it works fine on linus but on solaris it is not working.
    Please let me know where am i wrong.
    regards,

    How many files do you have in this directory? It could be that the expansion of the file list is too large for the shell to handle? Or that first asterisk is expanding to something unusable. I'm surprised this works in Linux. What shell are you using in Linux and what shell are you using in Solaris? What error message do you get when you try to run this in a Solaris system?
    Maybe try to use something like this:
    ls -1 | awk '{ print "grep -l "$1" "$1 }' | sh

  • How should I create JAR file which  contain JMF library and project classes

    Hi,
    I installed the JMF windows pack. I compiled and ran successfully myApplet (which use JMF librarie) in Internet Explorer on my machine. When I run this applet on some different machine, where JMF isn�t installed- it�s not running.
    There is an error:
    java.lang.NoClassDefFoundError: javax/media/ControllerListener
    I was trying to create jar file, which contain librarie JMF.jar and all other files which are require to run myApplet (*.jar, *.class, the files from folder �MyApplet�) and run it on the other computer. It still doesn�t work.
    Also I ran a JMF Customizer and created customize.jar but this file contains only JMF classes. I don�t know how add other files to it.
    How should I create a jar file which will contains all essential files to run myApplet on other machine (something like �All In One� J )
    I�m using Eclipse.
    Can somebody help me?.
    Thank You!
    Best regards:
    Peter

    Hi
    i want to make a jar file of application which is using JMF to play audio
    and video. it works well during compilation and execution but doesn't
    works in jar file.
    please help me how i make a jar file whic will run audio and video too
    your's truely
    abdul

  • Move Files By FileName

    I have a load of files that are desposited on my user desktop via ftp.  Each of these files begins with the same six letters.  It is a pain to select all of the files manually and then pull them into a folder.  I have looked extensively and have tried unsuccessfully to create an applescript that will accomplish the following action:
    Take the files with fileNames containing "XXXXX" (or beginning with "XXXXX") at "mac HD:user:me" and move them to the folder "XXXXX" at "mac HD:user:me."
    These files all end with the same extension, so I could also delimit the files to be moved by using their extension, if that is a better solution.
    Lastly, it would be great if I could also set the above action to occur automatically at some interval.
    I can't imagine that prescribing the above sort of action is difficult via applescript, but I must admit that a solution eludes me.  If someone happens to have a script that accomplishes this sort of action that they might share, please let me know.
    Thanks

    Twtwtw is right: there should never be a colon in any file name!
    I've put four JPEG files on my desktop, sequentially named “XXXX# - 20130410s132159265.jpg”,  “XXXX# - 20130410s132159266.jpg”,  “XXXX# - 20130410s132159267.jpg” and  “XXXX# - 20130410s132159268.jpg” (but without any colon in their names). Then I created a folder named “XXXX” in my home folder. Then I run the following script:
    set theDestinationFolder to POSIX file "/users/pierre/XXXX" as alias
    tell application "Finder"
              move (files of desktop whose name begins with "XXXX") to theDestinationFolder
    end tell
    The four files were properly moved to the destination folder, while the following result was displayed in the AppleScript Editor Result panel:
    {document file "XXXX# - 20130410s132159265.jpg" of folder "XXXX" of folder "pierre" of folder "Users" of startup disk of application "Finder", document file "XXXX# - 20130410s132159266.jpg" of folder "XXXX" of folder "pierre" of folder "Users" of startup disk of application "Finder", document file "XXXX# - 20130410s132159267.jpg" of folder "XXXX" of folder "pierre" of folder "Users" of startup disk of application "Finder", document file "XXXX# - 20130410s132159268.jpg" of folder "XXXX" of folder "pierre" of folder "Users" of startup disk of application "Finder"}

  • Script to search all files in specified folder for multiple string text values listed in a source file and output each match to one single results txt file

    I have been searching high and low for this one.  I have a vbscript that can successfully perform the function if one file is listed.  It does a Wscript.echo on the results and if I run this via command using cscript, I can output to a text file
    that way.  However, I cannot seem to get it to work properly if I want it to search ALL the files in the folder.  At one point, I was able to have it create the output file and appear as if it worked, but it never showed any results when the script
    was executed and folder was scanned.  So I am going back to the drawing board and starting from the beginning.
    I also have a txt file that contains the list of string text entries I would like it to search for.  Just for testing, I placed 4 lines of sample text and one single matching text in various target files and nothing comes back.  The current script
    I use for each file has been executed with a few hundred string text lines I want it to search against to well over one thousand.  It might take awhile, but it works every time. The purpose is to let this run against various log files in a folder and
    let it search.  There is no deleting, moving, changing of either the target folder/files to run against, nor of the file that contains the strings to search for.  It is a search (read) only function, going thru the entire contents of the folder and
    when done, performs the loop function and onto the next file to repeat the process until all files are searched.  When completed, instead of running a cscript to execute the script and outputting the results to text, I am trying to create that as part
    of the overall script.  Saving yet another step for me to do.
    My current script is set to append to the same results file and will echo [name of file I am searching]:  No errors found.  Otherwise, the
    output shows the filename and the string text that matched.  Because the results append to it, I can only run the script against each file separately or create individual output names.  I would rather not do that if I could include it all in one.
     This would also free me from babysitting it and running each file script separately upon the other's completion.  I can continue with my job and come back later and view the completed report all in one.  So
    if I could perform this on an entire folder, then I would want the entries to include the filename, the line number that the match occurred on in that file and the string text that was matched (each occurrence).  I don't want the entire line to be listed
    where the error was, just the match itself.
    Example:  (In the event this doesn't display correctly below, each match, it's corresponding filename and line number all go together on the same line.  It somehow posted the example jumbled when I listed it) 
    File1.txt Line 54 
    Job terminated unexpectedly
     File1.txt Line 58 Process not completed
    File1.txt
    Line 101 User input not provided
    File1.txt
    Line 105  Process not completed
    File2.txt
    No errors found
    File3.txt
    Line 35 No tape media found
    File3.txt
    Line 156 Bad surface media
    File3.txt Line 188
    Process terminated
    Those are just random fake examples for this post.
    This allows me to perform analysis on a set of files for various projects I am doing.  Later on, when the entire search is completed, I can go back to the results file and look and see what files had items I wish to follow up on.  Therefore, the
    line number that each match was found on will allow me to see the big picture of what was going on when the entry was logged.
    I actually import the results file into a spreadsheet, where further information is stored regarding each individual text string I am using.  Very useful.
    If you know how I can successfully achieve this in one script, please share.  I have seen plenty of posts out there where people have requested all different aspects of it, but I have yet to see it all put together in one and work successfully.
    Thanks for helping.

    I'm sorry.  I was so consumed in locating the issue that I completely overlooked posting what exactly I was needing  help with.   I did have one created, but I came across one that seemed more organized than what I originally created.  Later
    on I would learn that I had an error in log location on my original script and therefore thought it wasn't working properly.  Now that I am thinking that I am pretty close to achieving what I want with this one, I am just going to stick with it.
    However, I could still use help on it.  I am not sure what I did not set correctly or perhaps overlooking as a typing error that my very last line of this throws an "Expected Statement" error.  If I end with End, then it still gives same
    results.
    So to give credit where I located this:
    http://vbscriptwmi.uw.hu/ch12lev1sec7.html
    I then adjusted it for what I was doing.
    What this does does is it searches thru log files in a directory you specify when prompted.  It looks for words that are contained in another file; objFile2, and outputs the results of all matching words in each of those log files to another file:  errors.log
    Once all files are scanned to the end, the objects are closed and then a message is echoed letting you know (whether there errors found or not), so you know the script has been completed.
    What I had hoped to achieve was an output to the errors.log (when matches were found) the file name, the line number that match was located on in that file and what was the actual string text (not the whole line) that matched.  That way, I can go directly
    to each instance for particular events if further analysis is needed later on.
    So I could use help on what statement should I be closing this with.  What event, events or error did I overlook that I keep getting prompted for that.  Any help would be appreciated.
    Option Explicit
    'Prompt user for the log file they want to search
    Dim varLogPath
    varLogPath = InputBox("Enter the complete path of the logs folder.")
    'Create filesystem object
    Dim oFSO
    Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
    'Creates the output file that will contain errors found during search
    Dim oTSOut
    Set oTSOut = oFSO.CreateTextFile("c:\Scripts\errors.log")
    'Loop through each file in the folder
    Dim oFile, varFoundNone
    VarFoundNone = True
    For Each oFile In oFSO.GetFolder(varLogPath).Files
        'Verifies files scanned are log files
        If LCase(Right(oFile.Name,3)) = "log" Then
            'Open the log file
            Dim oTS
            oTS = oFSO.OpenTextFile(oFile.Path)
            'Sets the file log that contains error list to look for
            Dim oFile2
            Set oFile2 = oFSO.OpenTextFile("c:\Scripts\livescan\lserrors.txt", ForReading)
            'Begin reading each line of the textstream
            Dim varLine
            Do Until oTS.AtEndOfStream
                varLine = oTS.ReadLine
                Set objRegEx = CreateObject("VBScript.RegExp")
                objRegEx.Global = True  
                Dim colMatches, strName, strText
                Do Until oErrors.AtEndOfStream
                    strName = oFile2.ReadLine
                    objRegEx.Pattern = ".{0,}" & strName & ".{0,}\n"
                    Set colMatches = objRegEx.Execute(varLine)  
                    If colMatches.Count > 0 Then
                        For Each strMatch in colMatches 
                            strText = strText & strMatch.Value
                            WScript.Echo "Errors found."
                            oTSOut.WriteLine oFile.Name, varLine.Line, varLine
                            VarFoundNone = False
                        Next
                    End If
                Loop
                oTS.Close
                oFile2.Close
                oTSOut.Close
                Exit Do
                If VarFoundNone = True Then
                    WScript.Echo "No errors found."
                Else
                    WScript.Echo "Errors found.  Check logfile for more info."
                End If
        End if

  • Search 'filename contains' in finder. Help please

    Hello. I need to search my filesystem for any files containing the words "foo" (for example). Currently, when I type 'foo' into my finder search bar, it returns only those filenames starting with the word 'foo'. Can anyone tell me the way to adjust search behavior to search filenames containing 'foo' instead of starting with 'foo'?
    Thanks!

    That's odd: if I open the Applications folder, then do a Command-F search, with the criterion of
    "Name contains and"
    on the Apps folder, I get 143 results, including things like
    GarageBand
    GrandPerspective
    HandBrake
    Random Spheres.bmp
    copyLibFile.command
    bread and wine
    CopyAndPaste.js
    And so on. If I add the restriction, "Kind is Applications" I get four results:
    GrandPerspective
    PandoCalendar
    HandBrake
    GarageBand
    HOWEVER, if I leave the restriction "Kind is Applications" and delete the "Name Contains" criterion, and instead put and in the Search for field I get this bewildering result:
    CSSEdit
    Xee
    Neither seems to have anything to do with my Search for term. Looking at the metadata which is indexed I see both do have the actual word "and" at some point in their metadata. Poking around a bit and thinking, I concluded that the only way to get a partial name search is to use the "Name contains" criterion. If you use the Search box with the only criterion being "Kind is Any" you will get:
    1. Any file that has the word "and" in its content
    2. Any file whose metadata contains the word "and"
    3. A file where "and" is separated in the title by any method that Spotlight recognizes as a delimiter; thus you will get "Roll and Crash" and "Pen And Ink" and "FiveBySevenAndThreeH.txt" but not something like GarageBand.
    The delimiters that I know about off-hand are capital letters, spaces, the underscore (thus something like "washanddry" would show up), and periods (so if a file was named "foo.and.txt" it would show up). There are probably others as well.
    Francine
    Francine
    Schwieder

  • How to load a comma seprated text file which contain address in to sql server table using ssis package

    Hi,
    I want to load a file which is comma separated and contain address .Problem is that address its self comma seprated so how do I differenciate whether comma used for column seprator or it used in address.
    for eg.
    One person having address like
    "c/o AB corp,156 cross lane,USA"
    Thanks.....

    Hi SR_MCTS,
    Based on your description, you want to distinguish a comma is used for column separator or used in address column in a text file, then load the data from the text file to SQL Server table.
    As per my understanding, if you can replace the comma column separator to another delimiter like semicolon (;), just do it. Then we can select Semicolon {;} as Column delimiter for the Flat File Connection Manager. Or ensure all columns are enclosed in double
    quotes ("). Then we can set the double quotes (") as Text qualifier for the Flat File Connection Manager, and the commas will be loaded as part of the string fields.
    If you can't have that done, because computers don't know the context of the data, you would have to come up with some kind of rules that decides when a comma represents a delimiter, and when it is just part of the text. I think a custom script component
    would be necessary to pre-process the data, identify where a comma is part of an address, and then treat that as one field.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS

    Hai Frnds,
    i Attend an interview they asked this questions can u know the answeres . tell me .
    In File to file scenario how can we reprocess records which failed records.
    HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS
    Thanks in advance
    thahir

    Hi,
    Refer these links:
    this might help you
    Generic Approach for Validating Incoming Flat File in SAP XI - Part 1
    Generic Approach for Validating Incoming Flat File in SAP XI - Part 1
    validating against schema file for the output XML file
    Informing the sender about bad records
    Regards,
    Nithiyanandam

  • While saving a pdf file opened by foxit reader, the filename will be some strings

    '''''i opened a pdf file in firefox with foxit reader, the filename was ,for
    example, ol20120327.pdf, and i click the save and i got i file , the filename just some strings , not the real name. It really bothers me for a long time. ps: while in ie, maxhon ,they got the right name.
    i don't want change my default browser; i love firefox. i hope the problem would be solved. Thanks a lot''.'''

    try adobe reader

  • [svn] 1751: Bug: BLZ-174 - MessageClient.testMessage() is incorrectly doing a string compare for the subtopic header of an inbound message against the subtopic value (which may contain wildcards) that the Consumer is using.

    Revision: 1751
    Author: [email protected]
    Date: 2008-05-15 14:21:43 -0700 (Thu, 15 May 2008)
    Log Message:
    Bug: BLZ-174 - MessageClient.testMessage() is incorrectly doing a string compare for the subtopic header of an inbound message against the subtopic value (which may contain wildcards) that the Consumer is using.
    QA: No - customer verified the fix.
    Doc: No
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-174
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/MessageClient.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/MessageService.java

    If you create a metadatatype with a single metdata block, and you reference that in your vm/cm cell attribute using a *one* based index, Excel seems to see the link and it honors it when saving the spreadsheet.
    So, I ended up with something like:
    <c ... cm="1"/> (I'm dealing with cell metadata, but the concept is equivalente to value metadata)
    <metadataTypes count="1">
      <metadataType name="MyMetaType" .../>
    </metadataTypes>
    <futureMetadata count="1" name="MyMetaType">
      <bk>
        <extLst><ext
    uri="http://example" xmlns:x="http://example"><x:val>87</x:val></ext></extLst>
      </bk>
    </futureMetadata>
    <cellMetadata count="1">
      <bk><rc
    t="1" v="0"/></bk> <!-- this is what gets referenced as cm=1 on the cell -->
    </cellMetadata>
    Hope this helps. 

Maybe you are looking for

  • My ipad is not showing all my music or videos

    Looking for help with my iPad 2.  I have iTunes 11.1.5.5 on my Sony Vaio VPCSA laptop running Windows 7.  When I connect my iPad 2 and open iTunes, I can select my iPad from the menu column on the left and see 8 movies, all my music, and play lists. 

  • Error in DTP while loading master data

    Hi Experts, When Iam loading 0MAT_SALES attributes master data, the load is complete till PSA. But whicle executing DTP to reach its further data target "info object" I getting an error Data record 7632 ('030001DF2116VBG20V-M9‚B '): Version '030001DF

  • PDF files in Oracle

    Hello all, Does anyone have any experience with inserting PDF files into an Oracle database? Any help would be greatly appreciated. TIA, Troy Troy Burns Marriott Vacation Club Intl. E-mail: troy.burnsvacationclub.com Phone: (941) 688-7700 ext. 4408

  • Cue Point in FLV Help

    I have a progresive flv with an instance name of myVid which is already on the stage and set to autoplay via the component parameters tab. When the video plays and gets to a cue point I want the flv to pause. The cue point names (embedded when I used

  • Lync 2013 edge-no reverse proxy question

    I deployed lync 2013 edge server and no reverse proxy yet.I am trying to connect from my windows 7 machine with no luck and I can see a top reset on the firewall,my question is is reverse proxy required for the normal client to connect and do basic I