Recursive file list pattern

Hello,
I have created a subvi that searches through a main folder for specific files and adds them to a compressed folder. I have 4 folders I need to create for different types of collected files (.csv and .txt). The naming convention of the files include a subject identifier, task description, and time stamp (most of the time). Here are a few examples:
ABC_30s_narrow_ec_12-23-42-PM_R.csv (multiple with different time stamps)
ABC_30s_narrow_ec_12-23-42-PM_L.csv (multiple with different time stamps)
ABC_sts_arms_12-21-06-PM.csv (multiple with different time stamps)
ABC_Tablet_2_12-26-56-PM.txt (multiple with different time stamps)
ABC_gait.txt
ABC_zero.csv
I have tried using the pattern input of the Recursive File List vi to search for a specific task (e.g. 30s) and move that to a specified compressed folder (e.g. balance). The files are only moved if the "pattern" at the end of the filename. Does the pattern only match the end of the files listed or can I get it to search for the pattern in the middle of the name? And is it possible to search for two patterns (e.g. 30s and zero) and move them to the same folder, without overwriting the compressed file? I would like to figure this out without changing the naming convention too much (predetermined by somebody else).
Thanks in advance,
Anton
Solved!
Go to Solution.
Attachments:
example.png ‏633 KB

The OpenG List Directory Recursive does support searching on multiple patterns.  Otherwise yeah just use the native function multiple times.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

Similar Messages

  • Recursive File List VI

    Let me start off with saying that i have little experience with Labview. It's limited to altering programs I use for my research that were written by others. I'm looking to automate a data processing VI that a collegue created. As of right now, when the VI is run, it prompts me for the file to be processed, does the processing, then prompts me to input a file name under which the results are saved. However, I have about 700 files that need processed, and would love to have it run itself.
    I'm hoping to alter the file so that, instead of  prompting me for a single file, it prompts me for a folder, then processes any files it finds inside of that folder. I figure that the Recursive File List VI is a good choice, since it returns the files paths of anything within the folder in an array (if I understand correctly), but I'm not sure how to have the VI process these in turn.
    BASICALLY, I need a way to select a folder, and have LabView feed individual files into an already existing data processing VI (the insertion point would be an "open file" function). Can I use the Recursive File List VI for this? If so, how do I have it process the files individually. If not, what should I be using?
    Thanks a lot for the help.
    Solved!
    Go to Solution.

    Thanks for the quick reply. I messed around with it a bit after writing this and came up with something that seems to work (an image of it is attached). Automating the saving process is the next step, definitely.
    Right now I have the list of paths and the loop iteration number wired to an "index array" function. I was thinking the path list was in an array, and this way I would pull out an element with each loop iteration. Is this necessary? From what you've said, it sounds like the loop with take each element of the list in turn as it's passed into it. It seems to work now, so i guess it's not doing any harm, but any simplification would be nice, I suppose.
    Thanks again.
    [edit] To clarify, all I was trying to do in that piece is see if I could pull individual file paths out of the list. Once I get past that, I think I'll be fine doing the rest.
    Attachments:
    Recursive File List Use.jpg ‏32 KB

  • Problem with 'LS' command syntax for generating 'recursive' files list

    I'm having trouble getting a recursive (-R) directory listing of the contents of a flash drive --
    -- i.e., when I run the 'ls' command with the -R switch (in Terminal), I get either a recursive directory of what appears to be 'all volumes' (i.e., a very large file) or a zero-byte (empty) file.
    Terminal also keeps reporting "No such file or directory" but I don't know what it's referring to (it reports it with both the 'zero byte' listing and the 'large file' listing).
    Obviously, I'm making some 'syntax error' but I don't know what it is.
    Assuming the following . . .
    User = MK
    Flash drive = NO NAME
    . . . what is the correct command syntax to list only the contents of the flash drive (not 'all volumes')?
    My last try (it doesn't work) was:
    *ls -RTlp /Users/MK/Volumes/NO\ NAME > /Users/MK/Documents/flashdrive.dir*
    Thanks.

    Re: the original post, I should clarify that what I'm looking for is the syntax that will generate the recursive list of the flash drive's files +without first logging the flash drive+ (NO\ NAME) +as the working folder+.
    If I do the latter, I can get the recursive listing easily enough.
    What I haven't been able to do is generate the listing without first logging NO\ NAME as the working folder.
    Thanks.

  • Recursive file error 6

    Hello,
          I am getting the following error when I am using the "Recursive File List" vi,   "Error 6 occurred at List Folder in Recursive File List.vi>file_list.vi".  The dialog box also states that the npossible reasons are that there is a Laview Gernic file I/O error related to the NI-488. I have assumed that the Recursive File List vi does exactly what the name implies, you simply pass the vi a directory and presto...some times later it output the names of all of the files that exist in the directly you input and every dir below. 
    Regards,
    Kaspar
    Regards,
    Kaspar

    Error codes are sometimes re-used by software components. This is especially true for older code and/or libraries. Error code 6 can mean either a generic file I/O error or a GPIB error. Which one it means depends on what function generated. Since it was a file I/O related function then obviously it's not a GPIB error. With respect as to what it means, the full text is:
    Generic file I/O error. A possible cause for this error is the disk or
    hard drive to which you are trying to save might be full. Try freeing
    up disk space or saving to a different disk or drive.
    Does this error happen every time? Does it happen with a specific file? I am assuming that it's not a disk space issue (have you checked, though?). It's possible you may have a bad block on your disk. 

  • How to use dynamic file as welcome-file-list in web.xml

    I have configured my web.xml file as this,
    <web-app>
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>login.jsf</welcome-file>
    </welcome-file-list>
    </web-app>
    and my login.xhtml file as this,
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:f="http://java.sun.com/jsf/core">
    <body>
    <f:view>
    <h:form>
    UserName:<h:inputText id="userName"
    value="#{bean.userName}" rendered="true"
    required="true"/>
    Password:<h:inputText id="password"
    value="#{bean.password}" rendered="true"
    required="true"/>
    <h:commandButton id="submit" value="Submit" action="#{bean.authenticate}" />
    </h:form>
    </f:view>
    </body>
    </html>
    but when i deploy this using tomcat and try to put url as this,
    http://localhost:8080/project
    Its not identifying welcome file from web.xml
    I am getting error like this,
    The requested resource (/project/) is not available.
    How to resolve this,
    Thanks,
    Vinutha

    This might help:
    http://forum.java.sun.com/thread.jspa?threadID=696586
    As well, you might have to change the servlet-mapping in your web.xml. The url-pattern, I think, needs to be .xhtml. Your login.jsf file in the welcome list will need to be renamed to login.xhtml.
    CowKing

  • Using File.list()

    Hi,
    Im using FMS 3 on the server side when onConnect occures i
    need an array of all file that is the directory root/streams/myApp
    how do use the File.list() ? do i need to create a new file
    just for getting the list of files of the directory? and how do i
    get to do that on the directory i want ? is it like this:
    File.list(function(name){ return
    name.indexOf("streams/myApp/")!=-1);
    i so the example in the doc files :
    var a = x.currentDir.list(function(name){return
    name.length==3;});
    does x is a File object? and where the currentDir came from
    its not a File property?
    Please help ...

    In SSAS, File objects represent both files and directories.
    The "x" in the examples just means "arbitrary thing that has
    a member of whatever type we're talking about." In this case, "x"
    is something that has a member called "currentDir" that's a File
    object (presumably representing the current directory).
    I'm pretty sure you can create an equivalent like this:
    currentDir = File(".");
    Also, your search isn't going to work the way you expected.
    The find function doesn't search all subfolders recursively, and
    the name parameter only gets the filename (the last component of
    the path), not the entire pathname. You're going to want to open
    streams/myApp as a File, then just list everything in it.

  • Can someone tell me if there's a problem with my recursive file search?

    I've been trying to get a recursive file search working. I wanted to go through each directory and add every file to a database so I can use extremely fast, advanced file searches through my program. I wrote up this code
    <CODE>
    package myrecursive;
    import java.io.*;
    public class MyRecursive {
    public static void main(String[] args) {
    recursiveSearch("D:/");
    private static void recursiveSearch(String x) {
    String tempFile="";
    File dir = new File(x);
    File[] curDir = dir.listFiles();
    for (int a=0;a<curDir.length;a++) {
    if (curDir[a].isDirectory()==false) System.out.println(curDir[a]);
    else {
    tempFile=curDir[a].toString();
    recursiveSearch(tempFile);
    </CODE>
    The code was simple but I didn't think I could write it like this without killing my resources or getting a buffer overload. I ran it and it worked. However, I am running a high end box with 512MB of RAM and a 2.4 GHz processor so I don't know if what worked for me will work on a lower end machine. I was told you should avoid calling a method from itself is this true? How would I avoid it? Should I keep it this way? Any recommendations?
    NOTE: I ran the code through JBuilder. JBuilder has a console built into the IDE and will return a noise and the error code whenever it hits an error. Although my app kept shooting out files it found out I heard a noise a few times. Does this mean anything?

    First the formatting tags should be "[ ]" not "< >".
    I was told you should avoid calling a method from itself is this true?Recursion is a valid programming technique and in fact makes many algorithms much easier to code.
    so I don't know if what worked for me will work on a lower end machineIt may be a little slower but it will still work. Recursion only causes a problem with resources when you have many levels of recursion. On my system I have:
    C:\WINDOWS\TEMP\Temporary Internet Files\Content.IE5\
    In this case there is only 4 levels of recursion. This is not going to cause a problem. You would generally only have problems if your recusion routine is not working correctly and you get in an infinite loop which will lead to resource problems and an abend.
    In your particular case you aren't even using many resources at all since all you are doing is printing the file name.
    This [url http://forum.java.sun.com/thread.jsp?forum=57&thread=435487&start=3&range=1]post shows a recursive routine that list all files for a directory and displays them in a table. In this cause you might have a problem with resources depending on the number of files in the directory. But the resource problem is because of the memory to hold the filenames in the table, not because a recursive routine was used to get the filename.

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

  • URLs in orphaned file list?

    when I check for orphaned files on my very old, very messy
    website I see urls like "/http:/java.sun.com",
    "mailto:[email protected]" and nothing happens when I choose
    "open file". I can delete them from the list but when I run the
    orphaned files check again they're all back! what's going on?
    I recognize most of these as files and links that were
    deleted long ago (them and the pages that linked to them). How is
    dreamweaver finding these links and what are they doing in the
    orphaned files list?

    > I recognize most of these as files and links that were
    deleted long ago
    Under the main dw menu->Site->Advanced->Rebuild Site
    Cache.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Computer Contents in File List

    My file list now contains all of the items and files in my
    computer, including all materials on my back-up hard drive and the
    network. How do I delete this from the file list.

    That's normal- it belongs there. ignore it or use when it's
    handy.
    It's use is to find and copy files that are outside of the
    Local site folder
    while staying inside of dreamweaver.
    If it wasn't there- you'd have to go to the Desktop or My
    Computer, browse
    to the file, copy it, browse to the Local Site Folder, paste,
    then go back
    into dreamweaver.
    suggestion- go to the Help menu-->Using
    Dreamweaver-->the dreamweaver
    workspace or similar wording.
    > I am new to Dreamweaver 8 but there is s drop down menu
    under file. The drop
    > down is titled computer and when the drop down is open
    my options are
    > Macintosh
    > HD, PSP5000 (which is my back-up drive) and network.
    Separated by a line is
    > manage sites. Does this help?
    >

  • Unable to clear the recently open files list

    Currently, in order to clear the opened files list, the user has to go into the Windows registry.  This by itself can be bad if the user is not familiar with the registry; could mess up the registry if not very careful.  There appears to be no plug-in/addon for this option nor is there any user option to select to clear the list.  There is a setting in the options/permissions to limit the number of opened files to the list; the minimum number being one(1).  Cannot set this number to zero(0) unless maybe there is a registry fix for this.  I want to suggest that in the next release, or at least as soon as possible, to add to the Adobe Reader (by default) a user option to be able to clear this list with having to enter the registry.  Or, maybe create a plugin/addon to perform this action.  That's it.

    Hi Ineedtoknownow
    You can raise your feature request on below link : https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • After successful install, I am unable to use RoboHelp 7 because of constant refresh of file lists

    RoboHELP 7 installed on Windows XP
    Our enterprise support team installed RH7 on my new laptop via our corporate intranet.  I received an e-mail message reporting that the install failed so I contacted the support team, someone logged on to my machine by remote and did an uninstall of RH7.  Then, the install was done again and the same failure message was received.  Then, RH was uninstalled and the install was attempted for the third time.  Again, I received the failure message.  I had noticed that after each install the icons appeared on my desktop.  So, after this third install, I went ahead and clicked the RH7 HTML icon and the program seemed to start properly.  I have a key number from our enterprise team and I entered the key number to complete the registration.  The UI appeared and I selected my recent project.  RH built the file lists that I expected to see in the left panes of the interface but the file lists kept "twitching" and the cursor kept changing to the hourglass and back.  This happened about once every two or three seconds and I could not move my cursor fast enough to select a file.
    One of my co-workers suggested that I uninstall RH7 myself, check the registry and erase any robohelp entries.  I know this is risky but I am confident I can do it.  However, I would like to hear from any RH experts about how to solve this "twitching" problem, if there are other possible solutions.  Thanks.

    My gut feel is that if your organisation is large enough to have an Enterprise license, IT would not take too kindly to you uninstalling the product yourself and editing the registry. That's your issue though.
    If they are happy, then you could try www.revouninstaller.com with which a number of people have reported good results if you use the stronger options to clear the registry. Again at your risk and responsibility.
    You might also like to look at http://www.adobe.com/devnet/robohelp/articles/before_install.html. It includes the script IT should be using. Maybe that should be checked as well.
    The other approach is to get them to do a direct install. Worth trying given the issues you are having.
    See www.grainge.org for RoboHelp and Authoring tips

  • 'Open Recent' files list

    The 'Open Recent' files list is too short.
    Is there a way to make it longer, e.g. for 25 or 50 files?
    Thanks!

    I'm not sure that it's a good idea but it's your wish so here is the soluce:
    set nbRecents to 30
    do shell script "defaults write com.apple.iWork.Pages NSRecentDocumentsLimit " & nbRecents
    If you want the same behavior in Numbers, use:
    set nbRecents to 30
    do shell script "defaults write com.apple.iWork.Numbers NSRecentDocumentsLimit " & nbRecents
    In fact we may use that for every application with a Recent Items menu.
    I got it in a thread dedicated to the behavior of Script Editor.
    Yvan KOENIG (from FRANCE dimanche 10 mai 2009 19:16:11)

  • How to delete latest opened file in the recent opened files list?

    Does any one know if there is any api to modify the recent opened files list under the meun File->Open Recent File?

    There is not.

  • Can connect but not retrieve file list (VSFTPD) from within network

    Hi!
    I've got a D-Link DIR-100 wired router to which an Airport Express and an MSI Wind (Arch Linux server) is connected. I can connect to the Wind from outside the LAN, which includes SSH, HTTP and FTP. However, FTP won't work if I'm inside the LAN. The Wind has the IP 192.168.0.101 in the network, and I forwarded the port 22 for SSH, 80 and 443 for HTTP and 20-21 for FTP. I'm using OpenSSH, Apache, and VSFTPD.
    When trying to connect with Transmit (OS X) I get this error message:
    [b]Could not retrieve file listing.[/b]
    Server said:
    Illegal PORT command.
    Error -162: PORT failed
    The Transmit log looks like this:
    Transmit 3.6.7 Session Transcript
    LibNcFTP 3.2.1 (August 13, 2007) compiled for UNIX
    Uname: Darwin|asynja.local|8.11.1|Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386|i386
    220: (vsFTPd 2.1.0)
    Connected to www.mydomain.se.
    Cmd: USER myusername
    331: Please specify the password.
    Cmd: PASS xxxxxxxxxx
    230: Login successful.
    Cmd: TYPE A
    200: Switching to ASCII mode.
    Logged in to www.mydomain.se as myusername
    Cmd: SYST
    215: UNIX Type: L8
    Cmd: PWD
    257: "/home/myusername"
    Cmd: PASV
    227: Entering Passive Mode (192,168,0,101,227,13).
    Fixing bogus PASV data address from 192.168.0.101:58125 to XX.XXX.XX.XX:58125.
    Data connection timed out.
    Falling back to PORT instead of PASV mode.
    Cmd: PORT 192,168,0,102,204,170
    500: Illegal PORT command.
    Cmd: NOOP
    200: NOOP ok.
    Cmd: PORT 192,168,0,102,204,171
    500: Illegal PORT command.
    (I edited out the IP and login credentials.)
    If I try to connect to 192.168.0.101 though it works like a charm. How come I can't use the same adress? I can visit the external IP/HTTP in a browser, I can connect to it through FTP, but I can't view the files?

    Interestingly, the errors above seem to be a little bit of a
    red herring. If I turn off "enable file check in and check out" in
    Dreamweaver then files can be downloaded, edited and uploaded
    perfectly. I can also create new files. As soon as I turn checkouts
    back on, it stops working. The errors above show up in the Apache
    server log even when this box is unchecked and yet everything works
    correctly. Because Contribute offers no option for editing without
    writing extra info files to the server it still won't work.
    The Dreamweaver log shows the following when I attempt to
    check out a file:
    Started: 12/19/08 6:25 PM
    Operation timed out. Cancelling...
    Operation timed out. Cancelling...
    /webdav/robots.txt - error occurred - An HTTP error occurred
    - cannot get robots.txt. Dreamweaver could not connect because the
    server is down or not accepting connections.
    File activity incomplete. 1 file(s) or folder(s) were not
    completed.
    Files with errors: 1
    /webdav/robots.txt
    Finished: 12/19/08 6:27 PM
    As I mentioned, when I turn off checkouts this whole process
    works correctly, and I can edit and create new files.

Maybe you are looking for

  • Embedded html not showing up in firefox 18 on Mountain Lion.

    Very simple embed code I'm using to get around the lack of support for tables in muse. Works fine in safari and chrome, but firefox tells me "A plugin is needed to display this content" Of course, no such plugin exists, or should be necessary. Anybod

  • Updating LR5 Catalog to use different hard drive

    Just bought a new PC. All files (same folder structure) moved from D: to E:. How do I update LR5 catalog to "point" to different hard drive? Thanks for any and all help.

  • Solaris 8 installs but wont boot

    I am trying to install Solaris 8 on a Compaq Proliant DL360 i am using software cd 1 to do the install, downloaded the raid array drivers for Solaris and the install seems to go fine with no errors. The problem is when it reboots it goes the the scre

  • Generate report in Call Manager

    Dear Friends, I want to generate report for IP Phones(7960,7970,7940), to find ou their serial numbers, in Cisco Unified CM Administration 7.0.1. Can anyone please help me as I have more than 1000 IP Phones in my company. Any procedure or link on Cis

  • Error Description Reports 2.0

    Hi,can anybody tell me, if there is somewhere a description of Reports 2.0 error messages?Thanks in advance, Marc