How do I append data and sequence numbers to a *.csv file name?

All,
I am looking for an easy way to build a filename with the data and time included, as well as a sequential number between 1 and 999 in the following format:
C:\TestDirectory\test_11-08-25_1551_1301_001.csv
I have looked at using the Express function "Write to Measurement File" but I cannot see an easy way to include column headers as text into the output file.  Maybe someone could show me how to do that?
Or, someone could point me toward another function that allows me to date and serialize the file name.  Any help would be greatly appreciated.
I could code all this the old-fashioned, manual way, but I would rather find out if LabVIEW has built in functions that do this first.
Thanks!

Like this
Tim
Johnson Controls
Holland Michigan
Attachments:
Example.vi ‏13 KB

Similar Messages

  • How to fetch the Date column(or Month column) from the file name from the specified path in ODI 11g

    Hi ALL,
    Can any one help us regarding How to fecth the Date column(or month column) from the file name specified in the path in a generalized way .
    For example :
    file name is :subscribers (Cost) Sep13.csv is specified in the below path
      E:\Accounting\documents\subscribers (Cost) Sep13.csv
    here I need to fetch the "Sep13" as a Date column in the ODI 11g in the generalized way.
    Can any one help us in this case as early as possible.

    I would suggest using a piece of Jython code for this.  Something like this...
    import os
    import os.path
    filelist  = os.listdir(E:\Accounting\documents\)
    for file in filelist:
    datestr = file[19:-4]
    You'd need to work out what to do with datestr next...  perhaps write it to a table or update an ODI variable with it.
    Hope this is of some help.

  • How to add new text and an empty space before a file name with Automator

    I can create a new service to add to multiple files some text before the file name but I need to add even an empty space; e.g. file name original  becomes: new text(space)file name original. The aim is to add this text and space to multiple files.
    I hope to be understood. Please can somebody help me?
    Thanks

    This is an old Apple-supplied AppleScript that will do the job.
    IMPORTANT: note the conditions of use: it will choose the frontmost Finder window to operate on. Therefore, open the folder you want to change the names of and make it the front finder window BEFORE running the script.
    Add to File Names
    This script is designed to add a prefix or suffix to files in the front window of the desktop.
    If no folder windows are open, the script will affect items on the desktop.
    Copyright © 2001–2007 Apple Inc.
    You may incorporate this Apple sample code into your program(s) without
    restriction.  This Apple sample code has been provided "AS IS" and the
    responsibility for its operation is yours.  You are not permitted to
    redistribute this Apple sample code as "Apple sample code" after having
    made changes.  If you're going to redistribute the code, we require
    that you make it clear that the code was descended from Apple sample
    code, but that you've made changes.
    --March 2014: Changes by Phil Stokes to make the script work on 10.9
    --these changes are simply reversing the order of parameters in the lines that have "copy" in them
    -- The following line is disabled due to a Menu Manager bug
    --set the source_folder to (choose folder with prompt "Pick the folder containing the files to rename:")
    try
              tell application "Finder" to set the source_folder to (folder of the front window) as alias
    on error -- no open folder windows
              set the source_folder to path to desktop folder as alias
    end try
    set the prefix_or_suffix to ""
    repeat
              display dialog "Enter the prefix or suffix to use:" default answer the prefix_or_suffix buttons {"Cancel", "Prefix", "Suffix"}
              copy the result as list to {button_pressed, prefix_or_suffix}
              if the prefix_or_suffix is not "" then exit repeat
    end repeat
    set the item_list to list folder source_folder without invisibles
    set source_folder to source_folder as string
    repeat with i from 1 to number of items in the item_list
              set this_item to item i of the item_list
              set this_item to (source_folder & this_item) as alias
              set this_info to info for this_item
              set the current_name to the name of this_info
              if folder of this_info is false and ¬
                        alias of this_info is false then
                        if the button_pressed is "Prefix" then
                                  set the new_file_name to the (the prefix_or_suffix & the current_name) as string
                        else
                                  set the new_file_name to the (the current_name & the prefix_or_suffix) as string
                        end if
                        my set_item_name(this_item, the new_file_name)
              end if
    end repeat
    beep 2
    on set_item_name(this_item, new_item_name)
              tell application "Finder"
      --activate
                        set the parent_container_path to (the container of this_item) as text
                        if not (exists item (the parent_container_path & new_item_name)) then
                                  try
                                            set the name of this_item to new_item_name
                                  on error the error_message number the error_number
                                            if the error_number is -59 then
                                                      set the error_message to "This name contains improper characters, such as a colon (:)."
                                            else --the suggested name is too long
                                                      set the error_message to error_message -- "The name is more than 31 characters long."
                                            end if
      --beep
                                            tell me to display dialog the error_message default answer new_item_name buttons {"Cancel", "Skip", "OK"} default button 3
                                            copy the result as list to {button_pressed, new_item_name}
                                            if the button_pressed is "Skip" then return 0
                                            my set_item_name(this_item, new_item_name)
                                  end try
                        else --the name already exists
      --beep
                                  tell me to display dialog "This name is already taken, please rename." default answer new_item_name buttons {"Cancel", "Skip", "OK"} default button 3
                                  copy the result as list to {button_pressed, new_item_name}
                                  if the button_pressed is "Skip" then return 0
                                  my set_item_name(this_item, new_item_name)
                        end if
              end tell
    end set_item_name

  • Insert Data into Table from TXT or CSV file !!!!!

    Dear All,
    Recently I have started working on APEX. In Oracle Forms, we used to use TEXT_IO for inserting records into tables from txt files. Now I want to do the same thing in apex 3.2. How can I insert data into tables from txt of csv files.
    Waiting of your valuable suggestions.
    With kind regards,
    Yousuf.

    Yousuf
    wwv_flow_files is used by APEX to hold uploaded files.
    If you incorporate a file browse item on you page, browse for the selected file, then submit the page (having the PL/SQL process described as an on suibmit process) then what I detailed should work.
    If you don't need users to have access to this then just go to Home>Utilities>Data Load/Unload in APEX and there is a handy load utility there that does it all for you.
    Cheers
    Ben

  • How to increment the date using sequence?

    how to increment the date using sequence?
    01-jan-10
    02-jan-10
    30-jan-10

    794244 wrote:
    how to increment the date using sequence?
    01-jan-10
    02-jan-10
    30-jan-10This doesn't look like a task where a sequence is usefull.
    A sequence is a number generator that guarantees that multiple sessions will all get a different number.
    Even if the sequence is fetched for differnent users (=sessions) that the same time.
    This in turn means that the value returned by the sequence will depend on actions done in other sessions.
    Typical task: create a new unique primary key number. The number MUST be different in all sessions.
    In your case I guess that the same logic should work regardless of the session that executes it. So you need a "number generator" that works indepented from other session values. There are several ways to create such a numbered list.
    The basic idea is to create a select statement that simply returns as many rows as you need. And then use ROWNUM as the number generator. Examples how to do this have already been given. LEVEL works also in hierarchical queries.
    if my interpretation of your requirement is right, then all answers that really used a sequence seem to be wrong. Even if the output looks ok. At best they are just slow. To create new sequence values is a complex task and the database needs a little time for all the synchonization issues that come with it. At worst it will have gaps in the sequence because other sessions used the same value while the numbers were created.
    Edited by: Sven W. on Sep 20, 2010 2:08 PM

  • How can we append data in existing flat file

    how can we append data to a existing flat file (Text file).

    just fill the itab from data which suppose to append to text file.than read text file from GUI_UPLOAD and loop on itab and with the use of read statements you may append the data.

  • Append data and save in XML

    hi all ! I have some data that is stored in a XML fine and since each SML is client based it can be edited according to everyone tastes. So my question is, can someone point me out how to append data and then saving it into the XML (hopefully without having to rewrite the whole XML document.
    This is how Im retreiving my Data from the XML and my try at appending data, but I dont know if Im being succesfull because its not being saved:
    String path = "C:/MedPro";
                    File file = new File(path + "/XML/data.xml");
                    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                    DocumentBuilder db = dbf.newDocumentBuilder();
                    Document doc = db.parse(file);
                    doc.getDocumentElement().normalize();
                    /* PARA ALIMENTAR LA AGENDA CON LOS DATOS DEL XML*/
                    NodeList nodeLst = doc.getElementsByTagName("Agenda"); //Lista de Items para manejar la agenda
                    for (int s = 0; s < nodeLst.getLength(); s++) {
                        Node fstNode = nodeLst.item(s);
                        if (fstNode.getNodeType() == Node.ELEMENT_NODE) {
                            Element fstElmnt = (Element) fstNode;
                            NodeList fstNmElmntLst = fstElmnt.getElementsByTagName("sub");
                            Element fstNmElmnt = (Element) fstNmElmntLst.item(0);
                            Node nod=fstNmElmntLst.item(0).appendChild(doc.createTextNode("Hola"));
                            /*NodeList fstNm = fstNmElmnt.getChildNodes();
                            System.out.println("Agenda : " + ((Node) fstNm.item(0)).getNodeValue());
                            lista_agenda.add(s, ((Node) fstNm.item(0)).getNodeValue());*/
                    }Any help is appreciated.
    Thanks a lot!
    Edited by: juanmanuelsanchez on Oct 10, 2009 4:27 PM

    juanmanuelsanchez wrote:
    ok but is there a way to do it without having to rewrite the whole XML?short answer, no. xml, like many structured file formats, is not really amenable to "partial updating". the only way to "append" data to a file without rewriting it is to write to the end of the file. how will you maintain a valid xml format by only adding to the end of the file? i can't imagine the xml is that large seeing as you are using a DOM parser to read it, so i don't understand why you don't want to just rewrite the file.

  • How do I set date and time on apple tv?

    How do I set date and time on apple tv?

    Fixed the same problem, STEPS
    1. Reset your apple TV
    2.It will again stuck on that setting, ignore it by press menu
    3. Unplug ethernet wire
    4. Try to connect with wifi, it should be work with wifi connection as mine.
    5. Then you can switch back Ethernet wire after get fixed.
    Thanks. Lemme know dude if it's work.

  • In  BDC how you handled header data and item data

    In  BDC how you handled header data and item data

    Raja,
    Can you be more clear ?
    Usually you load the header data one and then loop at the item data and then load the item data.
    This example should help you.
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • How to find the Date and Time of Modification of Column in aTable?

    Hi all,
    Do  you know how to find the Date and Time of Addition of Column to a Particular Table?.
    I know however, How to find the modification time of the Table. Using the below Query :
    Select Object_Name, to_Char(Last_DDL_TIME, 'DD-Mon-YYYY HH24:MI:SS') Last_DDL from User_Objects where Object_Type = 'TABLE';
    Object_Name
    Last_DDL
    Employee
    20-Aug-2013 09:23:03
    I wanted to know the Creation or Modification Date and Timestamp of all columns of Employee Table?. Is it possible at all. If possible, How to get it?.
    Regards,
    Bhaskar M

    I agree with you on that. Since its a development enviornment I can remove the column but that not my point here.
    My whole purpose it to know whether we get the Column's Creation or Modification DateTime.

  • How to get the date and Time?

    Hi,
    I am using Jdev 11.1.2.0.
    I had one database table. In that table one variable as bgnDtm and the datatype as oracle.jbo.domain.Timestamp. In my Impl class I declare one variable as beginDate(DateType as oracle.jbo.domain.Date).
    Now I am using the conversion as beginDate=(Date) SampleVO.getAttribute("bgnDtm ");.If I using this scenario I got the Type cast error. so how can I separate Date and Time value.
    So how to do. Please provide some suggestions.
    Regards,
    Ragu.

    you can get the time value either from oracle.jbo.domain.Timestamp or from oracle.jbo.domain.Date
    oracle.jbo.domain.Timestamp timeStampDate = (oracle.jbo.domain.Timestamp) SampleVO.getAttribute("bgnDtm");
    Time time;
            try {
                time = timeStampDate.timeValue();
                System.out.println(time);
            } catch (SQLException e) {
                e.printStackTrace();
            java.sql.Date sqlDate=timeStampDate.dateValue();
                oracle.jbo.domain.Date jboDate=new oracle.jbo.domain.Date(sqlDate);
            Time timeValue = jboDate.timeValue();
            System.out.println(timeValue);Edited by: M.Jabr on Dec 23, 2011 1:55 PM

  • Camileo S20 - How to display the date and time

    Hi, to all. I have got as Christmas present the Camileo S20 and I am not able to display the date and time at video. In manual is no mention about this, just how to set the correct date and time. But what is intention of setting the date and time into camera, if it is not possible to display them on video ?

    Hi,
    of course, I did it repeatly, it is written in my question above. I am not stupid.
    This question is aimed to owners of camera Camileo S20 and also Camileo S10 - Camileo S20 is derived of Camileo S10, may be any of them discovered the way how to get the date and time into video.

  • How to capture the date and time of  a background job

    Hi experts,
    How to capture the date and time of  a background job?
    How to find whether it is runned succesfully or not?
    If it is not successful how to put error message?
    ASAP
    Thanx in advance,
    Sudha

    To Display the STATUS of the JOB which is exectued in background
      CLEAR : wa_jobsteplist.
      REFRESH : i_jobsteplist.
      WRITE:/ 'DISPLAYING JOB STATUS'.
      CALL FUNCTION 'BP_JOB_READ'
        EXPORTING
          job_read_jobcount           = w_jobcount
          job_read_jobname            = w_jobname
          job_read_opcode             = '20'
        JOB_STEP_NUMBER             =
       IMPORTING
         job_read_jobhead            = wa_jobhead
       TABLES
         job_read_steplist           = i_jobsteplist
    CHANGING
       RET                         =
       EXCEPTIONS
         invalid_opcode              = 1
         job_doesnt_exist            = 2
         job_doesnt_have_steps       = 3
         OTHERS                      = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    To Display the status text as per the status type
      CASE wa_jobhead-status.
        WHEN 'S'. WRITE: / 'Scheduled'.
        WHEN 'R'. WRITE: / 'Released'.
        WHEN 'F'. WRITE: / 'Completed'.
        WHEN 'A'. WRITE: / 'Cancelled'.
        WHEN OTHERS.
      ENDCASE.

  • How to view current  date and time on SAP screen

    Hi Everybody,
    How to view current  date and time on SAP screen .I have set time zone in T-code STZAC.now iam getting correct date n time in my tranctions but i want to check without any tractions
    Plz repay,Regards,
    Sadik.

    Hi,
    You can check the time by running a report .
    It will show the database and central instance time : Report name :rsdbtime
    Thanks and Regards
    Vijay kumar G
    Edited by: vijay kumar gopal on Mar 4, 2008 1:09 PM

  • How Production Order finish date and time is being comptued by SAP?

    Hello Expert,
    How Production Order finish date and time is being comptued by SAP? for example, we create a Production Order via CO01, the basic start date is 29.09.2008 and time is 04:00 it gives us basic finish date is 29.09.2008 and time is 13:28.
    how does SAP compute the time 13:28 as it finished time
    Please explain me briefly.
    Thanks
    Ryan

    Hello Guys,
    When we create Production Order in R/3 the time is calculated by routing but it is extended at SetUp machine time. It is not correct?. SetUp imachines time used only for first Production Order for the same product and it is plan manually, for others Production Order we need calculate time for production without SetUp machine time being pick up to compute finish time. how could we achieve this? only those Machine time will be check.
    thanks

Maybe you are looking for