Increment file number

The problem statement:  Create a test application that saves the test report with a filename that increments each time the test is run.
Example:
VR-1524-NXX-XXXXXXXX-June 17, 2011 - 100015
VR-1524-NXX-XXXXXXXX-June 17, 2011 - 100016
VR-1524-NXX-XXXXXXXX-June 17, 2011 - 100017
The next time the application is opened and the product is tested, the number needs to increment to 100018.
Aside from creating a txt file that contains the increment number, what is the best practices method for solving this issue?
-Regards
eximo
UofL Bioengineering M.S.
Neuronetrix
"I had rather be right than be president" -Henry Clay

Here is how I would do the name part. From here you just need to save the name in the text file and make it so it can open it.
Tim
Johnson Controls
Holland Michigan
Attachments:
SAVE VI.vi ‏9 KB

Similar Messages

  • My Script Saves My Files In Incremental file names but can't save to original folder?

    hi everyone,
    so after a few hours of browsing the forum, was able to scotch tape this script together so it allows me to save my files in incremental file numbers.
    - i create an action to edit the file and then in that action, i run this script x-amount of times.
    - it works as i tested it a few times.
    but here are my questions that i can't figure out.
    1. right now it says to a folder that i have to designated. how would i edit this code so it'll save in the same folder as the file i am editing?
    2. so far it saves as a jpeg. does anyone know the syntax to use for a gif?
    and if you're kind enough...let's say i have an animated gif file, i can't edit it in photoshop so i have to use imageready but how do i replicate the above in imageready since we're on the same topic.
    THANKS!!! code is below:
    // This script will save the active document to a folder with an incremental sufix
    // Change the options below to match your needs
    var saveFolder = new Folder( 'C:\\test' );
    var saveExt = 'jpg';
    var saveSufixStart = '_';
    var saveSufixLength = 3;
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = true;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.quality = 8;
    // End of user options
    //==========================================
    function zeroPad ( num, digit ){
       var tmp = num.toString();
       while (tmp.length < digit) { tmp = "0" + tmp;}
       return tmp;
    var docName = decodeURI ( activeDocument.name );
    docName = docName.match( /(.*)(\.[^\.]+)/ ) ? docName = docName.match( /(.*)(\.[^\.]+)/ ) : docName = [ docName, docName, undefined ];
    var saveName = docName[ 1 ]; // activeDocument name with out ext
    var files = saveFolder.getFiles( saveName + '*.' + saveExt );// get an array of files matching doc name prefix
    var saveNumber = files.length + 1;
    //alert("New file number: " + zeroPad( saveNumber, saveSufixLength ));
    var saveFile = new File( saveFolder + '/' + saveName + '_' + zeroPad( saveNumber, saveSufixLength ) + '.' + saveExt );
    activeDocument.saveAs( saveFile, jpgSaveOptions ,true ,Extension.LOWERCASE);

    ImageReady? Which version of Photoshop do you use?
    1. right now it says to a folder that i have to designated. how would i edit this code so it'll save in the same folder as the file i am editing?
    You need to amend the line
    var saveFolder = new Folder( 'C:\\test' );
    accordingly.
    2. so far it saves as a jpeg. does anyone know the syntax to use for a gif?
    There are examples on the Forum, for example
    http://forums.adobe.com/message/3928843#3928843

  • Labview IMAQ VI for capturing images and saving with incremental file names

    Hello,
    I am using LabView 7.1(IMAQ) to capture images with NI's PCI 1426 card, and a JAI CV-M2 camera. Now, with the example VI's like LL Grab, or LL Sequence, or Snap and Save to File.vi, I can capture the images. But what I actually want is to capture images continuously and keep saving them with a sequentially incrementing file name.
    I have tried to modify the Snap and Save to File.vi  by adding a 'for loop', so as to run this for required number of images. This works okay, but I can't really change the file name after every image. However, I'm not confident with this method either. I think it would be better to use the buffer itself, as is given in LL Grab.vi and somehow save images from the buffer. I think this would be faster ?
    In any case, any ideas as to how I should go about implementing auto-incrementing of the file name ?
    Any help will do. 
    Thanks.
    - Prashant

    Hi,
    Thanks a lot for replying. 
    I tried using this in the VI i was working with, but using the "build path" vi doesnt seem to work. If I use just the base path from user's input, it works, but then again it keeps overwriting the images into one file rather than giving each file a new name. I'm attaching the vi. 
    Please take a look and tell me where i'm going wrong.
    Thanks again.
    Attachments:
    LL Sequence_mod.vi ‏62 KB

  • Increment the number with date/time string. when ever the next date come's it should reset again with initial number

     i want to store the number of records in a file. Every time when ever i run the program the record will be incremented well i using forloop with count value 1 as a constant .in the for loop i am using autoincrement with the  feedback node . to view the number i have attached the indicatator .the number will be increment every time . i am using number to time time stamp  that is connected to get date/time string. from that we can view the date string and time string . so , my issue is when ever i close the code again it is coming with intial value . i should get from that number only where ever i close the code . after the date completed again it should come from intial value . i am attaching the code so that u guys can solve my problem.
    Attachments:
    record.doc ‏34 KB

    here you can see.......the file path in case structure in that i have included my requirement of increment the number 
    -> if the case is true then it goes in ok file path and the no of records string will pass in the file by seeing these code u will get the clarity
    my requirement is the number of records should increase ........ whnever the program runs...that i made it. by the next day again it should begain with the intial value.........that is my requirement. i hope u understand .
    suggest me how can i use the  intial  value .......
    Attachments:
    code.vi ‏35 KB

  • How do I get the file number to show under my photos? I am using Elements 10 with Windows 7

     

    Hi,
    Sorry, but do you mean filename - not sure what file number you refer to?
    For Filename, on the View menu ensure that Details and Show File Names are both checked. You may have to make the size of the thumbnails slightly larger (using the slider on the top of the windows) as the information can't be displayed if thumbnail too small.
    Brian
    Jon typed faster than me

  • Custom File Name-Original File Number doesn't work. Why?

    I want to export and rename some files with the "Custom File Name-Original File Number" option. Yet this doesn't seem to work, and I wondered what I might be doing wrong. The filename will only rename as the custom text.
    The sample file name shown underneath has a dash after the custom text bit, but then the extension only eg Newname-.tif
    I am now using LR 4.2 but I seem to remember doing this renaming OK with an earlier version (though I can't remember which). This suggest that either there is a problem with this specific version or that I have something set differently to the way I had it initially. I am hoping the latter is the case. Any suggestions as to how to fix this would be welcome!

    I am sorry to report that i don't know how to create a screenshot. However, what I am getting, exact;ly is this:
    From Library grid view: F2 or Library>Rename Photo
    Then little screen appears with heading Rename Photo:
    File Naming> set to Custom Name - Original File Number
    Custom Text> NewFilenameHere
    Example: NewFilenameHere-.tif
    Clicking on OK changes the filename to just the custom text without the original file number. Original File name shows in metadata eg DSC01129-Edit.tif
    The only way i seem to be able to get the original file number with the custom text is to include it manually as part of the custom text.

  • Increment a number without using sequence in Mapping

    Hi,
    Is there anyway to increment a number without using oracle sequence generator in OWB? I am using version 10.2.0.4.
    Please let me know.
    Thanks,
    Siva

    Perhaps it would help if you were more specific on what you wanted to do. I mean, there are many ways to generate sequences of numbers in Oracle. For example:
    select level as seq_num from dual connect by level < 100;
    to get the integers from 1 to 100. If you are dealing with order of rows within subsets of a query, take a look into analytic functions like rank().
    But "Ways to increment a number"? Sure:
    create function increment( x in number) returns number is begin if x is not null then return x+1; else return null; end if; end;
    Now call your increment function!
    Not sure what you are trying to accomplish, and can't help much without knowing.
    Sorry.

  • Vat code change, EDI file number finding and EDI file structure chage?

    Hello Gurus
    Our client has a plant in Europe, which has a largest supplier. We process electronic invoices to the vendor through a provider OB10 ( private company - invoicing provider ).
    In the transfer of the electronic data to the invoice posting, a VAT code is added to the details, that appears to be pulling from a certain Table in the system.
    I want to know from which tables this field has pulled up to the Invoice?
    In continuation of the process ...I have come across an issue on EDI file structure change. I have provided with the the Idoc numbers of above invoices, from the idoc numbers i need to find out the EDI file number. But when i went to WE02, WE05 with those idoc numbers i couldn't find the EDI file number( Interchange file number ref).
    How can i find the EDI file number and i have to suggest the EDI team for changing the file structure in regard to the VAT code updating according to the Plants abroad function.
    What are the things i need to suggest them exactly in regard to this?
    Please reply me ASAP...
    Thanks
    Mallik

    The table for tax code is T076M - maintainable using T code OBCD.  For EDI file number, execute T Code WE02 - enter IDoc number and execute (F8). In the right window pane, choose select layout -> change layout and pick up the field Interchange file reference. Guess this is what you are looking for.
    OR
    Go to transaction WE02 or WE05 enter Idoc number and choose execute. When Idoc data is displayed double click on Control Record in left pane. Choose Details tab. Interchangable file under References.
    You can also refer the entries in table EDIDC.
    Reference to interchange file:
    This field contains the reference number of the interchange file in which the EDI message was transmitted.

  • Missing file number suffix metadata when exporting

    Hello All,
    I export files from Lightroom 2 (LR2) using custom filenames that include file number, i.e. "Original number suffix", metadata. This metadata is not being picked up by the export module and will therefore not be included in the exported filename. This happens with files that have been edited in Photoshop (CS3), but not with the original DNG files.
    So if I have a master file named "Davison-20080809-1234-Master.psd", I in Lightroom 1.x (LR1) I set up a custom filename scheme in the export dialogue box that will export the master as "Davison-20080809-1234-BW-Web.jpg", or similar. This has worked with no problems to date.
    In LR2, when I look at the Example field under File Naming in the Export dialogue, I see only "Davison-20080809-BW-Web.jpg"--the original number suffix is missing along with one of the hyphens around it. When I create a custom file naming scheme with only the "Original filename suffix" metadata in it, it shows "_.jpg" in the Example field.
    It looks like maybe two things are happening.
    In LR1, if a piece of metadata was missing, it would still export a filename with all the hyphens around the missing data, so I would get "Davison-20080809--BW-Web.jpg" if the number suffix were missing. Someone probably tweaked that in the new version of Lightroom so that the unsightly double hyphenation would not appear. So this doesn't look like it's related to the problem.
    The second thing that appears to be happening is that Lightroom 2 is either not exporting (in file metadata) or not tracking (in the LR catalogue) the number suffixes. I've looked for the number suffix in Photoshop's metadata and it's not stored in the metadata at all. When I copy a Photoshop file with a suffix that does export correctly in LR2, rename the file "Test-20080809.psd" and import it into LR2, Lightroom parses the date (YYYYMMDD) as the number suffix and "20080809" is what I get when I export that file. This indicates that LR1 and LR2 store the number suffix in the catalogue and for some reason LR2 is not preserving the number suffix in the catalogue metadata when a file is edited in Photoshop.
    So has anyone else run into this problem? Or is someone interested in reproducing it? It looks like a bug to me.

    I'm also running into this same problem. For what it's worth, when I import my RAW files (as DNGs), I rename them using a naming scheme which looks like the following:
    (2008-08-13) -019- (7108).dng
    This scheme is created with the following elements (separated by line-breaks):
    custom date formula
    import number
    original file suffix
    In Lightroom 1, I had no problem. Now, I'm wondering if the parenthesis after the end of the file suffix is what's causing Lightroom 2 to think that there is no suffix?

  • Export for system copy fails - Error 9 (Bad file number)

    Hello all,
    I am attempting to perform the export phase for a hetergenous system copy on our BI system (BI 7.0 - NW2004s).  This system runs on HP-UX 11.11 using Oracle  10.2.0.2 and will be migrated to Windows Server 2003 and MS SQL Server 2005, once the export is complete.
    While running sapinst to export the data from the source system, there are several input dialog screens that are skipped, which means I am not able to enter all the paramters used for the export.  After seeing this behavior from sapinst, I reviewed the sapinst.log and sapinst_dev.log files and find the warning/error "System call failed. Error 9 (Bad file number)".  I have included a portion of these files below.
    I have reviewed notes 546006 and 583861, but these seem to refer to an Oracle error ORA-27121, but I am not receiving any Oracle errors in sapinst.log or the Oracle alert log.  I have looked for possible permission or ownership problems with any of the SAP or Oracle files, but have not found any that were incorrect.  Also, these errors do not specify which file sapinst is having problems with, so I do not have  a specific file or area to check.
    If anyone has seen something similar to this and has any suggestions, I would greatly appreciate any help.
    sapinst.log details:
    INFO 2009-02-14 15:15:51.67
    Execute step collect of component |NW_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|1|0|NW_readProfileDir|ind|ind
    |ind|ind|0|0
    INFO 2009-02-14 15:15:52.737
    Account bwpadm already exists.
    WARNING 2009-02-14 15:15:52.747
    System call failed. Error 9 (Bad file number) in execution of system call 'getgrent' with parameter (), line (292) in file (syuxcuse
    r.cpp).
    INFO 2009-02-14 15:15:52.757
    Account 0 already exists.
    WARNING 2009-02-14 15:15:52.777
    System call failed. Error 9 (Bad file number) in execution of system call 'getgrent' with parameter (), line (292) in file (syuxcuse
    r.cpp).
    INFO 2009-02-14 15:15:52.777
    Account 200 already exists.
    WARNING 2009-02-14 15:15:52.827
    System call failed. Error 9 (Bad file number) in execution of system call 'getgrent' with parameter (), line (292) in file (syuxcuse
    r.cpp).
    INFO 2009-02-14 15:16:04.937
    Creating file /tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/AS/EXP/ypcat.log.
    INFO 2009-02-14 15:16:05.007
    Output of ypcat passwd.byname is written to the logfile ypcat.log.
    sapinst_dev.log details:
    TRACE      2009-02-14 15:15:52.737
    2009-02-14 15:15:52.743 NW._getSAPMount() done: /sapmnt
    INFO       2009-02-14 15:15:52.737 [syuxcaccmg.cpp:227]
               bool CSyAccountMgtImpl::isExisting(ISyAccountMgt::eAccountType accountType, iastring sName)
    Account bwpadm already exists.
    TRACE      2009-02-14 15:15:52.747 [syuxcuser.cpp:1943]
               CSyUserImpl_getOsInfos(ILogBook *m_logBook, iastring sName, iastring sID, tSyUserInfo& msUserinfo)
    getspnam(bwpadm) returned NULL.
    WARNING    2009-02-14 15:15:52.747 [syxxsyshlp.cpp:78]
               syslib::printOSError(const iastring &, int, DWORD, const iastring &, CMessage::eLogMessage)
    System call failed. Error 9 (Bad file number) in execution of system call 'getgrent' with parameter (), line (292) in file (syuxcuse
    r.cpp).
    Regards,
    Rusty Robbins

    Hello Peter,
    Thanks for the reply. I did confirm the points you made, and have the details below.
    1. check filesystem, if you have enough space, especially /tmp
    All filesystems have available space, and /tmp has 310 MB available, before the start of sapinst.
    2. check again alert log, trace log for Oracle,
    I could not find any errors in the alert_SID.log or any unusual trace files.
    3. How did you run sapinst? Are you using "root" account.
    I am running sapinst as user root and I am following all the recomendations in the system copy guide (at least as far as I can tell.  ;p )
    We have four BI systems in this landscape, and the other three have migrated successfully.  The procedure I am using, is the same as for the other 3 systems and uses the same SAP media directory that was used on the other systems.
    One other item that may be part of my problem here, is that this system is the production system, and was originally installed as a high-availability system, using HP-UX Service Guard for clustering.  Currently, this system does not have fail-over enabled, but of course the cluster is still intact.  One required piece of the Service Guard enviornment is the use of a virtual hostname.  This seems to resolve successfully by sapinst, as I see the correct (virtual) hostname referenced several times.  While this is a clustered system (for fail-over purposes), the CI and DB are installed on the same host.  So it is not a distributed system, and if failover had been initiated, it would fail both the CI and DB instance, which is the same and only SAP instance.
    This did raise one question in my mind, however.  I am attempting to extract this using the following menu path within sapinst.
    SAP NetWeaver 7.0 Support Release 3  --> Software Life-Cycle Options --> System Copy --> Oracle --> Source System Export --> Central System --> Based on AS ABAP and AS Java
    Since this does use Service Guard, but is not a distributed system, should I be using a different path in the sapinst tree, for the export?  I have only performed a migration using the above path, so I am not familar with the detailf of the other types, such as High-Availabitly or Distributed-System.
    Regards,
    Rusty

  • ADP file number Generation

    Hi Guru's,
    I had created a custom Infotype 9001 to generate ADP file number.SAP HCM  will be the first point of data entry for creating and maintaining the employee record.  Data is then passed to third party systems for payroll processing and time keeping.The 3 fields(ADP file number , ADP company code and Badge number.) will be stored and maintained in infotype .
    The problem is with ADP file number.The logic is :This is a required input field. Personnel Actions New Hire, Convert  Non-employee to employee and Retirement  will automatically generate a new file number and populate this field. For the other personnel actions, users will be prompted with a pop-up window displaying the message u201CDoes the employee need a new file number?u201D.If NO then, the program finds the most recent ADP file number and populates the field with this number.If the program does not find any ADP file number, then the field should be open for user input.If YES, the program extracts the next generated number using function module u2013 u201DNUMBER_GET_NEXTu201D.
    ADP file number screen field  is ZADPFN.
    I am not able to write the code as i am very new to Implementation i.e How the ADP file number field will get populated?
    Do i need to declare  some variables with same name as screen fields?
    Please help in ABAP code.

    Mr Lonely wrote:
    Here is my situation.
    1. I generate file_name through a function.
    2. File name like File_DD_MM_YY_FLXXX.
    3. Now this FLXXX is the filenumber. It will be 1 for the 1st run of the day and for each of the new run it will be +1. Again next day it will start from 1.
    So right now I am using a sequence and resetting it at 12 AM to 0. Is it a good approach to solve the scenario? Any better idea?Hmm.. not sure I like the idea of resetting a sequence.
    Your case is an exception where one can consider serialisation - as it is unlikely that having to serialise, will have any significant performance impact on the file create processing. It is very different than requiring surrogate keys for OLTP.
    I would use a PL/SQL function - that uses a date as input parameter, and returns the next sequential file number for that date. Underneath, a table can be used (day,file-sequence). If no row for the existing day exists, a new row is inserted and file sequence set to 1. Serialisation would be done via standard row locking. With the lock on the day's row, being held for a minimal time (e.g. autonomous transaction instead of being part of the file process's transaction).

  • Idoc Number and EDI file number...

    Hi gurus
    How do we know EDI file number from the IDoc number ?
    I have Idoc numbers with me but is there any way that i can know that the EDI file number associated with that ?
    Thanks
    Meenakshi Nakshatrula

    Hi,
    Go to transaction WE02 or WE05 enter Idoc number and choose execute. When Idoc data is displayed double click on Control Record in left pane. Choose Details tab. Interchangable file under References.
    You can also refer the entries in table EDIDC.
    Reference to interchange file:
    This field contains the reference number of the interchange file in which the EDI message was transmitted.
    Regards,
    Srilatha.

  • Thumbnails from a D800 showing as a NEF and nikon file number, no picture

    thumbnails only showing as a NEF and nikon file number no picture D800 camera

    What version Photoshop and Bridge and what type and version OS?
    Where do you expect to see the thumbnails and where are they not showing up? In Bridge or in the Mac Finder/Windows Explorer?
    If you can, supply a screen shot.

  • CS4 Thumbnails do not show metadata or file number

    All of a sudden my Bridge Content panel does not show any info on thumbnail photos, neither file number nor any metadata preferences.  Info is OK in the Metadata window, but not on Content pane
    Also, the file folder thumbnail icons in Content panel now have the file numbers super-imposed over the file instead of below.
    These must be related.
    Coincidentally the font size of my Metadata panel suddenly got bigger and bolder, not the Keyword panel or any other, just Metadata.  Doesn't really bother me, but seems odd these have all just happened
    Using OS 10.5.8
    Should I delete some sort of preference folder ?  Where ?
    Thanks

    All of a sudden my Bridge Content panel does not show any info on thumbnail
    photos, neither file number nor any metadata preferences.  Info is OK in the
    Metadata window, but not on Content pane
    Also, the file folder thumbnail icons in Content panel now have the file
    numbers super-imposed over the file instead of below.
    That is caused by accidently hit cmd+T and that command does hide the
    thumbnail info and put the name of the folder over the icon.
    Hit cmd + T again to solve this or go the menu view and deselect the Show
    thumbnail only command
    Coincidentally the font size of my Metadata panel suddenly got bigger and
    bolder, not the Keyword panel or any other, just Metadata.  Doesn't really
    bother me, but seems odd these have all just happened
    That I have not seen before but might be solved with resetting the prefs as
    Tai Lao described in his post.

  • Bridge file number vs. camera's file number

    I've gone through everything I can think of on Bridge CC and the tutorials and I'm still stumped.
    My current camera (Olympus OM-D) file number is 4126 but when I open it in Bridge the file number is 3129. I've tried everything I can think of in Bridge file renaming, but can't seem to either change the file # or eliminate it. It's a problem because I've always used the date+camera file number to find archived files. I'm willing to change to fit into Bridge, but...
    Questions:  is Bridge using a sequential numbering system that is unique to Bridge? And if so, can I change it to be consistent with the camera sequential file number?

    Good day everyone,
    To khcole,
    Please check your memory card and verify if the old pictures and new ones are on the same folder (eg. 100MSDCF, 101MSDCF) under [DCIM] folder. Both folders will start the numbering sequence at DSC-00001, to start at DSC-05208 make sure that the folder will contain images which will fill out the sequence upto DSC-05207 otherwise that camera will fill those empty slots until it uses the DSC-05208 onwards.
    To grosenfeld,
    As both file using the same file name and extension cannot co-exist under the same folder, one needs to be saved on different folder. Using an image viewing software such as the Playmemories Home (PMH), you'll be able to view both pictures and you should be able to see when the images are taken, imported, modified or what camera was used for a particular image under PMH's filters or the properties of the pictures.
    2 things can happen if you try importing a picture that has the same file name and extension as the existing image on a destination folder.
    1. The original file could be replaced by the new one intentionally/unintentionally.
    2. The new picture will be saved with (#) between the file name and extension (eg. DSC-00001(2).jpg) as the computer will recognize these files as duplicates even if it isn't.
    If my post answers your question, please mark it as "Accept as Solution"

Maybe you are looking for

  • Materialzied Refresh is very slow in oracle10g

    We are migrating our database from Oracle8i-->Oracle10g. But in dataware housing we are facing problem for refresh materialized view is very slow We change due to this below. 1. exec DBMS_MVIEW.REFRESH('MVIEW,atomic_refresh => FALSE ); Our two parame

  • Reg : Cosignment Stock

    Hi ,                Good Evening to all. My name is Usha . I am new to SAP MM . I have one doubt .          How to transfer the consignment stock to unrestricted stock automatically if we mention certain period of time. Means after that time , the st

  • Can dbms.output in procedure impact its performance?

    If dbms.output is used in procedure inside a loop, which gets executed for bulk data, can it have a performance impact in terms of execution time it takes? Consider server.output is ON..

  • Placeholder in properties bundle

    I'm using the <f:loadBundle> and <h:outputText> tags to reference a property message with two placeholders - {0} {1}. How do I make substitutions (backing bean properties) for the placeholders at run time? I tried adding two <attribute> tags as body

  • Linux ubuntu firefox 3.6 fonts

    I have mentioned last time the firefox fonts problem in linux ubuntu. Now i have the proof ! I already follow many fonts setting instructions via forums but it still the same. This is the only reason i switch to chromium, google chrome. http://img442