Search for file based on file date

I have an application that performs testing and I calculate and record several metrics into datalog files.  For certain metrics, I create a new datalog file for each day of testing.
What I want to be able to do for one metric in particular is to recall historic data from previous files programatically. In other words, I want to display the previous day's data or week old data as a comparison to the current day's data without any user intervention.
My file naming convention is to use an identifier for the type of data stored and then include the date the file was created (one file per day) ie.  FPY_09-19-12.dl  (FPY = First Pass Yield btw)
I could probably take the current day's file path\name and go through some routine to change the date info but this seems kludgy and would have to account for weekends, holidays and what not.
My prefrence would be to automatically search the data file path or folder (all files for a given metric are stored in a single network folder) and find the most recent file that is older than the current date or perhaps a weeks worth of files so I can average data across multiple days.
Any thoughts on an approach to this would be appreciated.
Doug
"My only wish is that I am capable of learning each and every day until my last breath."

The List Folder function will return to you a list of files as an array of strings. You could then search this string. If you want to deal with timestamps (perhaps some of your searching may be easier if you have a timestamp datatype), then you can simply convert each string in the array. Something like this:
Attachments:
parse file names into timestamps.png ‏20 KB

Similar Messages

  • Can ditto select files based on modification date?

    Hi. I'm trying to use ditto to make backups. I would like to have it select only files modified after a certain date. Is there a way to do this?
    I noticed the bom (bill of materials) option... can that be used for this purpose somehow? Not quite sure how best to create a BOM that includes only files based on modification date.
    Any suggestions? Thanks
    Eric

    ditto doesn't provide a way to select only files modified after a certain date -- but find does; see the "-newer" and "-newerXY" options. Using find, you can generate a BOM file listing files that have been modified after a certain date.
    Then you can pass that BOM file to ditto.
    Powerbook G4 1GHz   Mac OS X (10.3.9)  

  • Searching for flash based forums, or a way to load forums into flash ?

    Im searching for flash based forums, or a way to load forums into flash ? i found this
    http://activeden.net/item/flash-forum/52576?page=1
    Any ideas or recommendations would be greatly appreciated

    You can load the raw html - if flash is told (e.g. via
    flashvars) the url of the page that you want (its available in
    flash as what you would think of as the browser's 'view source'
    style plain text) with either as2 or as3.
    But you can't do full browser-style rendering of the content
    because flash just can't do all that. You could parse the raw html
    (probably a custom parser as I think the internal xml parser might
    choke on some of the tags in html that are not closed such as
    <br> etc) and just pick out bits of text or images that you
    could display but you can't achieve an embedded browser.
    Adobe's AIR might be more what you want - it has embedded
    browser support- but it doesn't run inside a browser like flash.

  • Searching for string in text files on XP

    Hi,
    At the moment I'm working on a Struts program. The output I get is:
    The requested resource (Invalid path /displayAddProductForum was requested) is not available.Somewhere in my files, I have a line containing /displayAddProductForum that should be displayAddProductForm. As I'm using XP as my development platform, I use the 'Windows Explorer' search facility. And I have noticed this search facility does not look in .java, .jsp and any other file with a non-Microsoft file-extension. So, how do you search for a string in a source file on XP?
    Abel

    sabre150 wrote:
    kajbj wrote:
    sabre150 wrote:
    Abel wrote:
    , I use the 'Windows Explorer' search facility. And I have noticed this search facility does not look in .java, .jsp and any other file with a non-Microsoft file-extension. So, how do you search for a string in a source file on XP? Err.. On my XP it does search though java/jsp files if I tell it to!You mean by modifying the registry?No! Using the right mouse click on a directory to get a context menu -> Search -> (All or part of filename : .java ) and (A word or phrase in the file : blah blah blah) -> Search
    Edit : Errr.. maybe I'm talking rubbish because I have just tested this and it only finds 5 java files of mine that contain the word 'class'! I'm sure it used to work because in my 'Windows' days I frequently used it.
    Edited by: sabre150 on Dec 20, 2007 12:44 PMSounds a bit odd. Search in windows should only search in registered file types and neither jsp nor java are registered types. It's however possible to modify the registry and add extensions (but it's not possible to say search within all types of files, and that sucks)

  • Use files based on a date/time stamp in order

    I have a PL/SQL procedure that is using BFILE to pick-up and read a file. The file will have the same starting characters for every file followed by a date/time stamp: AAAA_09232009
    I need my procedure to use the file with the oldest date first and then rename the file after the procedure has run through it. Can anyone assist me in this? Below is the beginning of the procedure --Thanx in Advance:
    create or replace PROCEDURE XML_READ_FILE
    as
    v_bfile BFILE := BFILENAME('XML_DIR', 'AAAA_09232009.xml');
    v_clob CLOB;
    BEGIN
    DBMS_LOB.createtemporary(v_clob, TRUE);
    DBMS_LOB.OPEN(v_bfile, DBMS_LOB.lob_readonly);
    DBMS_LOB.loadfromfile(v_clob, v_bfile, DBMS_LOB.lobmaxsize);

    See if this helps:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584

  • Search for a word in files

    Hi all,
    i need a help here..
    i am doing document search in my jsp application...i have all my files inside a folder..folder contains many folders and inside many files are there..if i specify one string it should display all the files that contains that word.
    for example if i search a word "welcome" if any file that contains welcome at any part of document it should specify that file along with the path and then the file should open when i click the link..pls tell me how to do that..

    Have a recursive method that takes as a parameter a File, an ArrayList of matches so far, and the String to search for. In your servlet, call it with a blank arraylist. Then iterate through the arrayList, and instead of outputting the path on the file system, output the URL.
         private void fileSearch(File currdir, ArrayList matches, String word) throws IOException{
              File[] fileset = currdir.listFiles();
              for (int i =0; i <fileset.length; i++){
                   if (fileset.isDirectory()) fileSearch(fileset[i], matches, word);
                   else{
                        BufferedReader reader = new BufferedReader(new FileReader(fileset[i]));
                        boolean found=false;
                        while (reader.ready() && !found){
                             String currline = reader.readLine();
                             if (currline.indexOf(word)!=-1){
                                  matches.add(fileset[i].getAbsolutePath());
                                  found=true;
                        reader.close();

  • Relocating files based on creation date

    Hello,
    I have a folder full of hundreds of Video clips. I am interested in a script that will
    1. look at the files sequentially
    2. For each file read the creation date
    3. If a Folder with that creation date does not exist, create a folder with that creation date (YYYY-MM-DD)
    4. Move the file to the folder with the file's creation date
    I've never used automator. Is this easy to do using that program?
    The reason I want to do this is to avoid having to manually re-organize the videos by date, if I were to import the contents of the existing folder of video clips into iMovie.
    Appreciate any input you can provide.
    Thanks.

    Automator is designed to take small, pre-written routines (actions) and string them together into a workflow. There isn't a default action to do something like this, but the Run AppleScript action can be used. Actually, an AppleScript would probably be the way to go, but I just happened to have an Automator action lying around for some reason.
    Tested workflow:
    1) *Ask for FInder Items* {Type: Folders}
    2) *Get Folder Contents* (be careful with getting subfolders - this action will go into packages)
    3) *Run AppleScript:*
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters} -- create folders and move
    make new folders from file creation dates (if needed), then move document files into their respective new folders
    if no container is specified (missing value), the new folder will be created in the containing folder of the item
    if the container is not a valid path (and not missing value), one will be asked for
    input: a list of Finder items (aliases) to move
    output: a list of the Finder items (aliases) moved
    set output to {}
    set SkippedItems to {} -- this will be a list of skipped items (errors)
    set TheContainer to "" -- a Finder path to a destination folder, or missing value for the source folder
    if TheContainer is not missing value then try -- check the destination path
    TheContainer as alias
    on error
    set TheContainer to (choose folder with prompt "Where do you want to move the items?")
    end try
    tell application "Finder" to repeat with AnItem in the input -- step through each item in the input
    if TheContainer is not missing value then -- move to the specified folder
    set {class:TheClass, name:TheName, name extension:TheExtension} to item AnItem
    else -- move to the source folder
    set {class:TheClass, name:TheName, name extension:TheExtension, container:TheContainer} to item AnItem
    end if
    if TheClass is document file then try -- just documents
    set TheDate to text 1 thru 10 of (creation date of AnItem as «class isot» as string) -- YYYY-MM-DD
    try -- check if the target folder exists
    get ("" & TheContainer & TheDate) as alias
    on error -- make a new folder
    make new folder at TheContainer with properties {name:TheDate}
    end try
    -- duplicate AnItem to the result
    move AnItem to the result
    set the end of output to (result as alias) -- the new file alias
    on error -- permissions, etc
    -- set the end of SkippedItems to (AnItem as text) -- the full path
    set the end of SkippedItems to TheName -- just the name
    end try
    end repeat
    ShowSkippedAlert for SkippedItems
    return the output -- pass the result(s) to the next action
    end run
    to ShowSkippedAlert for SkippedItems
    show an alert dialog for any items skipped, with the option to cancel the workflow
    parameters - SkippedItems [list]: the items skipped
    returns nothing
    if SkippedItems is not {} then
    set {AlertText, TheCount} to {"Error with AppleScript action", count SkippedItems}
    if TheCount is greater than 1 then
    set theMessage to (TheCount as text) & space & " items were skipped:"
    else
    set theMessage to "1 " & " item was skipped:"
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SkippedItems, AppleScript's text item delimiters} to {SkippedItems as text, TempTID}
    if button returned of (display alert AlertText message (theMessage & return & SkippedItems) ¬
    alternate button "Cancel" default button "OK") is "Cancel" then error number -128
    end if
    return
    end ShowSkippedAlert
    </pre>

  • Generating structured XML file based on relational data base

    Hi,
    I need to use XML DB to generate a structured XML file based on the relational oracle database. I start by using Oracle default table, emp,
    Here is EMP data,
    EMPNO ENAME DEPNO SAL
    123.00 E1 20.00 1,000.00
    124.00 E2 20.00 2,000.00
    125.00 E3 20.00 2,000.00
    126.00 E4 30.00 3,000.00
    127.00 E5 30.00 3,000.00
    128.00 E6 30.00 4,000.00
    129.00 E7 40.00 7,000.00
    I used this SQL statement to generate an XML output,
    select XMLElement ("Department",
    XMLAttributes(deptno as "DEPARTMENTNO"),
    XMLElement("EmployeeName", ename),
    XMLElement("Salary", sal)
    ) "Result"
    from
    emp
    where
    deptno=20
    The result was
    <Department DEPARTMENTNO="20">
    <EmployeeName>E1</EmployeeName>
    <Salary>1000</Salary>
    </Department>
    <Department DEPARTMENTNO="20">
    <EmployeeName>E2</EmployeeName>
    <Salary>2000</Salary>
    </Department>
    <Department DEPARTMENTNO="20">
    <EmployeeName>E3</EmployeeName>
    <Salary>2000</Salary>
    </Department>
    but I need this structure instead,
    <Department DEPARTMENTNO="20">
    <EmployeeName>E1</EmployeeName>
    <Salary>1000</Salary>
    <EmployeeName>E2</EmployeeName>
    <Salary>2000</Salary>
    <EmployeeName>E3</EmployeeName>
    <Salary>2000</Salary>
    </Department>
    Could you guide me how I can generate this kind of structure like master-detail structure and which document you recommend to obtain this point.
    Thanks,
    Shiva

    Hi,
    If you want to write an xml into file, I think you should use PL/SQL.
    Is it even possible to spool output into file without the query itself?
    doen't show me a proper xml fileTo get well-formed xml, you also have to make a root element.
    If you want <?xml version="1.0"?> also then use xmlroot(), but I haven't figure out
    how to specify the encoding.
    SQL> WITH xtab AS(SELECT 'E1' ename,20 depno,1000 sal FROM dual
      2               UNION ALL
      3               SELECT 'E2',20,2000 FROM dual
      4               UNION ALL
      5               SELECT 'E3',40,3000 FROM dual
      6               UNION ALL
      7               SELECT 'E4',30,4000 FROM dual)
      8  SELECT XMLRoot(XMLElement("Company",XMLAgg(XMLElement("Department",
      9           XMLattributes(depno as "DEPARTMENTNO"),
    10             XMLAgg(XMLForest(
    11                      ename AS "EmployeeName",
    12                      sal   AS "Salary"))))),version '1.0') company_xml
    13  FROM xtab
    14  GROUP BY depno;
    COMPANY_XML                                                                    
    <?xml version="1.0"?>                                                          
    <Company>                                                                      
      <Department DEPARTMENTNO="20">                                               
        <EmployeeName>E1</EmployeeName>                                            
        <Salary>1000</Salary>                                                      
        <EmployeeName>E2</EmployeeName>                                            
        <Salary>2000</Salary>                                                      
      </Department>                                                                
      <Department DEPARTMENTNO="30">                                               
        <EmployeeName>E4</EmployeeName>                                            
        <Salary>4000</Salary>                                                      
      </Department>                                                                
      <Department DEPARTMENTNO="40">                                               
        <EmployeeName>E3</EmployeeName>                                            
        <Salary>3000</Salary>                                                      
      </Department>                                                                
    </Company>
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Searching for source in unrecognized file types

    Using DW CS5, I'm unable to find text while searching that is in some of my files. I think this might be because these files are not recognized as source code by Dreamweaver. They are PHP files but they have the extension .ctp instead (because they are Cake files).
    Is there any way to get Dreamweaver to consider these files when searching? I have already specified that Dreamweaver should be used to edit these files in Preferences -> File Types / Editors.
    Thanks,
    Stephen

    Stephen,
    Using DW CS5, I'm unable to find text while searching that is in some of my files. I think this might be because these files are not recognized as source code by Dreamweaver. They are PHP files but they have the extension .ctp instead (because they are Cake files).
    Is there any way to get Dreamweaver to consider these files when searching? I have already specified that Dreamweaver should be used to edit these files in Preferences -> File Types / Editors.
    Yes. This TechNote explains it:
    http://kb2.adobe.com/cps/164/tn_16410.html
    Randy

  • Receivable Aging Report for India based on Invoice Date

    We have a reporting/legal need for our India location to report the aging of their receivables based on the invoice date of the documents rather than the net due date.  Is there an existing report available that already does this?
    Currently when you use FBL5N and related aging reports RFDOPO10 etc. it calculates the arrears from the net due date.  They need to calculate the arrears from the document date.

    The report S_ALR_87012168 still does not allow me to choose that I want to calculate the arrears from the document date rather than the net due date:
    I guess what they really need to know is how old the receivables are based on the date they were created.
    As in the example below, current aging reports use the Net Due to calculate a days in arrears of 6 days (based on current date of 2008/11/05).
    Ty Doc. Date  Pstng Date Bline Date Net due dt Arrea
    RV 2008.09.30 2008.09.30 2008.09.30 2008.10.30     6
    What they need is the number of days in arrears based on the document date (2008.09.30) which would increase the numer of days the receivable has been open to 36.

  • BPM - merge files based on file name

    Hi All,
    i need to collect two source files based on the file name in BPM and then process it.
    Lets say, i need to collect a header file and a items file. but any point of time, there can be more than one header and more than one item file in the source folder. and i need to collect the header and its corresponding/related item file.
    can anyone help me how to achieve it in BPM? whats the correlation i need to give? is it possible to have a java code executed in BPM?
    Is it possible to take care of this at adapter level itself while picking the file? if so, whats the file name scheme can i give?
    Faster reply is very much appreciated.
    Thanks n regards,
    Rashmi

    hi,
    we can have the header file as header and item file as item. basically based on our convenient we can suggest the file name to the sender. so scheme can be anything that fits our requirement

  • Where to search for a specific Dimention related data

    Hi,
    I guess, hyperion planning store the dimention related data( parent, child, uda,attributes, consolidation operator, data storage etc) in some relational tables of that planning application. Can anybody help me understand where & how those data is stored and what are the table name I should look for a particular dimention related data?
    Actually I need to look into the planning RDBMS table to get the membernames of one particular dimention and search another huge Oracle database to search for those and retrieve the relevant data writing a query. I am using Planning ver9.3.1
    Please revert back for any clarification.
    Regards.

    Hi,
    Take a look at below tables in your application repository schema (db), they are all linked through id fields and they include dimensional infromation.
    HSP_OBJECT
    HSP_OBJECT_TYPE
    HSP_DIMENSION
    HSP_MEMBER
    HSP_ALIAS
    You get detail information from HSP_OBJECT. HSP_OBJECT keeps entire details for entire metadata. Other tables will help you understand the relations, positions etc.
    Cheers,
    Alp

  • Searching for tasks based on Responsible Resource

    Hi All,
    I am having a requirement to search for all the tasks within cProjects based on the Responsible Resource field in cProjects. I am planning to design a custom Webdynpro application for this purpose. The requirement is that when i enter the user name of a person the entire list of tasks for which that user is the responsible resource is to be displayed.
    Can anyone tell the related tables for this purpose? i want to know which table contains the Responsible Resource field. Also, i would like to know which tables are related to this functionality. If anyone can give me an idea to get me started, that would be great.
    Best Regards,
    Mazin
    Edited by: mazin mahmood on Dec 10, 2008 2:49 PM

    Hi Mahmood,
    You've probably already figured this out, but you might want to look into DPR_ENTITY_LINK.This table lists role assignments to task. The fields that would be of interest to you are the following:
      -  Entity_GUID = Task GUID (system value)
      -  Participant_GUID (system value)
      -  Responsible (boolean) - part-guid is "responsible role"
      -  Concrete (boolean) - part-guid has "resource' (concrete role)
      -  Entity Type (of structure item)
    Note, though, that this table will not have entries if there are no role assignments in your tasks. Since you're trying to identify responsible resources (concrete role), this won't be an issue when querying the table.
    Good luck.
    Lawrence

  • Sales Order in PCUI: Search for products based on BP?

    Hello,
    my customer wants to migrate to PC-UI and has the requirement that when creating a new sales order the search for products only returns those products that are defined by a partner-product relation PPR, as is possible in standard SAPGui. Unfortunately I do not see a way to restrict the search for products in a way like this, is there?
    Thanks
    Thomas

    Hello thomas,
    If it is not available in standard, you can always enhance the query method of your MAC to show select only products based on your parner-product relation PPR.
    Regards,
    Frederic

  • Custom search for Catalog based on UDF fields combination

    Can we customize in OIM 11g R2 PS1 to search catalog items based on multiple fields (similar to User search scenarios). If someone has to search based on combination of 2-3 custom attributes e.g. UDF fields , is it possible ? do we need to do complex changes in code through Catalog APIs ?
    Edited by: Shashi kiran on May 15, 2013 9:45 AM
    Edited by: Shashi kiran on May 15, 2013 9:49 AM

    In my scenario , i have to customize catalog search with combination of 2-3 attributes including UDF attributes with standard attributes (Application Instance, Role and Entitlement). As, these 3 attributes (Application Instance, Role and Entitlement) are by default out of box ,present for catalog search we can use their combination for catalog search.
    But, what if along with these standard attributes ,if there are other custom attribute like UDFs (e.g. : Sub application,Domain,etc) in combination ?
    Is this customization for catalog search is possible through UI or do we have to make changes in Source Code exposing catalog APIs to work this scenario out ?
    Edited by: Shashi kiran on May 16, 2013 12:06 PM

  • Is it possible to search for a specific term or data in Numbers for iOS?

    I looked for similar questions, but all of the similar questions did not specify if they were talking about the Mac version or the iOS.  So I apologize if the question has been asked.
    Is there a way to search for a specific term or criteria in Numbers for iOS?
    My father owns a small business and has a large inventory of parts.  He wants a simple way to search his inventory for a particular part number and see how many of a the specific part number he has in his inventory, while not in the shop or having to call in.  He wants to take an iPad along with him.
    My first thought was to create an spreadsheet.  I have a basic knowledge of how spreadsheets work, and I don't think my father would like anything more complicated.
    I was thinking about making the 1st column list the part number, 2nd column list the quantity in the shop, 3rd column list the quantity in the truck.
    If Numbers for iOS is not able to do this, suggestions for alternatives are welcome.
    Thanks in advance

    Hi j4nitor
    Would the "Find" option in the "Tools" menu do the job?
    If you search for the part number, it will be highlightet, and with your outline for a setup, I guess that would give you the overview you are talking about.
    Hope it helps.
    Best regards
    Ole

Maybe you are looking for