Using a for loop to create multiple files ???

I have the below code. I want to make a file for every element stored in the array. How do I do this?
Vector files = new Vector();
for (int i = 0; i<files.size(); i++)
     //System.out.println(files.elementAt(i));
}

Not much. Are the files being created by processes on multiple hosts? If not, adding the host name and IP seem useless. Are the files being created by multiple processes and/or multiple threads on same host? If so, then the former isn't helpful. Is it possible for two threads or processes to create a file in the same millisecond - if not IMPOSSIBLE then it is possible and 99.99% chance that they won't isn't good enough. If so, then that won't work either. What if a single thread quickly creates two files in same millisecond - remember the millisecond value may not change for several milliseconds due to host system architecture.
So, I guess it depends on your requirements.

Similar Messages

  • I have used a 'for loop' to create an array of output data, however I want the each of the data sets from the array to be placed into a 1-D array. How do I concatenate the output of the for loop into a 1-D array?

    I am using this to create a data set that will be passed as an anolog output therefore it needs to have the correct array dimensions to go into the analog write vi.

    I'm updating my request... I've figured out how to do this by copying an example that uses a simple FOR loop (as seen in the attached current version of my VI). My question now becomes this: Is there a way to save the Y values corresponding to those X values into two more arrays? That is, just for argument's sake, let's say I took the first 100 elements from the X array, and found them to be positive. Then I would like to take the first 100 elements of the Y array and put them into a 'Y Values for X > 0' array. ...And likewise with the negative X values, they should have a separate array of corresponding 'Y values for X < 0' array.
    I can see that I should somehow save the indices of the positive X values from the large arrray wh
    en I sort them out, and use those indices to pick out the elements from the main Y array with the same indices.
    I just can't seem to set up the code necessary to do this. ...Can anyone help, please?
    Attachments:
    Poling_Data_Reader_5i.vi ‏79 KB
    30BLEND.txt ‏3 KB

  • How to use BAPIs for Infopackage execution : loading multiple files

    Hello
    I have been told that BAPIs can be used to load multiple csv files at once for which some BAPIs exists (BAPI_IPAK_CREATE_FROM_REF , BAPI_IPAK_CREATE , etc)
    I have users who will be dropping their standard files in a directory (this should be a local one or server one ?) according to one of 3 types of formats defined.
    As they wont be trigering the IP but instead plan to use a Process chain need a way to collect all files and trigger a IP that can process them all
    Can somebody lead me into using the appropriate ones in the right way?
    thanks

    First if you are using process chain then the files should be placed in Application Server only and process chain can not work with IPs which are using Local Files.
    Instead of BAPI in the infopackage there is a feature to select the file using routines. May be you  can pick the necessary file in the routine itself.
    In the extraction tab you can find this option.
    Regs
    Gopi
    Assign points if it is useful

  • I'm creating an array using a for loop, how do I get the values outside the loop while it is running? thanks

    I'm creating a set of values using a for loop and a shift register inside the loop. I want access to these values outside the loop as they are being created inside. When I connect a wire from the shift register to a display outside, it doesn't work. How do I do this? Thank you.
    Attachments:
    tamko_new.vi ‏29 KB

    I tried to create the local variable that was wired to numeric indicator inside the loop. If I try to connect this to the analog output outside the loop, the loop just starts blinking and nothing happens, am I doing something wrong? Thanks again.
    Attachments:
    tamko_new2.vi ‏29 KB

  • How to create multiple files with Receiver File Adapter in SAP PI 7.31 Java Stack

    Dear Friends,
    I am using Sender JDBC Adapter and Receiver File Adapter in Integration Flow in SAP PI 7.3 EHP 1 SP08 Java Stack environment. The requirement is that we need to create multiple files based on the row count in jdbc resultset. If there are 5 rows in resultset, we need to create 5 XML files with one row elements in one file. Similarly if there are 10 rows, we need to create 10 XML files.
    So how can we create multiple files in this scenario. I tried placing a for loop in the Java Mapping as below in the transform method:
    DynamicConfiguration conf = arg0.getDynamicConfiguration();
    StringBuffer sbFileData = new StringBuffer();
    for (int i =0; i < record.size(); i++ {
         . // Create XML for each row and Marshal the object into to the String Buffer
         String strFileName = "DC_" + new SimpleDateFormat("ddMMyyyyHHmm").format(new java.util.Date())+"_"+i+".xml";
         conf.put(KEY_FILENAME, strFileName);
         arg1.getOutputPayload().getOutputStream().write(sbFileData.toString().getBytes("UTF-8"));
         arg1.getOutputPayload().getOutputStream().flush();
    So here I'm flushing the OutputStream for each record. But it's not creating the multiple file, instead it creates only one file will all record XMLs appended to each other.
    Please let me know if I missing something or need to do some thing else.
    Regards,
    Shreyansh Shah

    Hi
    You can easily achieve this using graphical mapping.  Create your target message type like below
    MT_Target
      Details  0 to 1
          Data  0 to 1
    Source sample structure
    <resultset>
    <row>
    <column-name>column-value</ column-name>
    </row>
    Then do the message mapping like below
    map <row> with  MT_Target
    contant ----> Deatils
    column-name ------>Data
    In the signature tab of message mapping, choose the occurrence of your target message type as
    0 to unbounded.
    This will generate multiple files from multiple rows.
    Let me know if you have any doubt.

  • Acrobat 9 - Batch Create Multiple Files

    Hopefully someone can help me with this problem, or at least shed some light on it for me.
    I am using Acrobat 9. I have Creative Suite 4 (InDesign, Illustrator, Photoshop, etc.) There is a new feature in Acrobat 9 called "Batch Create Multiple Files", which can be found in the File menu, under "Create PDF".
    This feature is supposed to create pdfs from multiple native file types, including InDesign. Acrobat uses the native application, in this case InDesign CS4, to open each file selected in the batch and then create a pdf file from it. This would be a really cool feature if I could get it to work.
    Each time I try to run this, I get an error message stating "Cannot open the document". I have an operator who can get this to work, if they use CS3 InDesign documents (she also has CS3 installed on her mac), which doesn't make sense to me because Acrobat 9 is a part of CS4.
    Is it possible that I am missing a plug-in? Has anyone experienced a similar problem, or does anyone have a solution for me?
    Thanks,
    Jeff

    You should remember that Acrobat 9 Pro came out BEFORE InDesign CS4. It has not yet had an update. The release InDesign CS4 format DID NOT EXIST when Acrobat 9 Pro came out, so it cannot yet convert it.
    You'll have to wait for an update to Acrobat 9 Pro.

  • Changing the pdf profile of batch create multiple files in Acrobat?

    Is it possible to load another pdf profile for batch create multiple files from Acrobat? I am batching indesign pages and I need to use a high resolution pdf profile with printer marks
    The default seems to be low res rgb. Any idea if this can be done?

    it is a custom Pdf Profile but basically an X1a with a few tweeks, When I try a watch folder with distiller it just errors out all the files.
    Batch Processing using the "Create PDF, Batch Create Multiple Files " in Acrobat works but does not let me choose a pdf profile.
    C

  • Batch create Multiple files in Acrobat X and X1 cannot convert Word 2010 with graphics

    I work for an exams board where hundreds of exam papers are produced. Once approved, these exams are converted to PDF and sent to print.  Using the Batch Create Multiple Files option is therefore essential to getting these papers print ready on time.  We have found that using this function to convert multiple Word 2010 files with graphics will not render it properly.  It deconstructs the graphics which loses the integrity of the exam paper. 
    I have trialled the same group of files on Acrobat X1 with the same result.
    Have other Acrobat Pro Users experienced the same problem?  Is there a fix? 

    I have uploaded the files and shared them.  These are the links
    Grade 11 Maths Standardisation Project Paper 2 2013.doc
    https://files.acrobat.com/preview/9694310d-ca7f-4919-883d-c53b36215d89
    Grade 11 Maths Standardisation Project Paper 2 Analysis Grid 2013.doc
    https://files.acrobat.com/preview/97da9e5f-d412-4d25-9bbc-d1a525d90826
    Grade 11 Maths Standardisation Project Paper 2 Diagram Sheet 2013.doc
    https://files.acrobat.com/preview/f50dd62e-af04-4060-85c5-fa81ce6803d8
    Grade 11 Maths Standardisation Project Paper 2 Formula Sheet 2013.doc
    https://files.acrobat.com/preview/7fc6007b-aaa6-4d65-9a8c-bf99818474a5
    Grade 11 Maths Standardisation Project Paper 2 Marking Guidelines 2013.doc
    https://files.acrobat.com/preview/b3a715bb-3683-48df-b0ec-3d17442275be
    Grade 11 Maths Standardisation Project Paper I Analysis Grid 2013.docx
    https://files.acrobat.com/preview/ab62e6b6-0261-434e-8a2f-382f74335685
    The first file is the problem file.  If you create this file separately, Acrobat will convert it perfectly.  But "Batch create multiple files" and the graphics are deconstructed on page 8

  • To create multiple files with same content but with different names

    Hi SapAll.
    here i have got a tricky situation on Idoc to File Scenario.
    in my interface of an Idoc to file ,there  is requirement to create multiple files with different file names but with same content based on one Idoc Segment.
    which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).
    so here for now iam using one reciever file communication channel.
    can any body give me the quick answer.
    regards.
    Varma

    What do you mean by different names?
    when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.
    You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!
    If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.
    Do not use a BPM!
    Regards,
    Abhishek.

  • Premiere CS4 is Creating Multiple files when rendering

    We have used Adobe Premiere for just over seven years now with great success.  Five days per week we create videos with Adobe Premiere with three computers. We presently upgraded to the new CS4.  The computer that that program is installed on is used to edit 30 and sixty minute television shows.  The files start out as .AVI files then, when finished they are rendered and saved as MPG2 files.
    We are currently experiencing a problem with this new program that we have not ever experienced in the past.  Description of problem:
    We import a 30 or 60 minute .avi file into a project.  We then place it on the timeline.  On these timelines there are only the video layer and the audio layer, no more than that.  We then make the editing changes that are necessary.  We then go to export the file to the Adobe Encoder to be saved as a MPG2.  When we do this, while in the process of encoding the file, Premiere will create four (4) files when it was not told to do so.  When this happens of course with a 60 minute file, it can take a very long time to encode, (because it is creating multiple files).  We have needed to stop the process, and change the name.  This sometimes works, and sometimes it does not.
    We are hoping that someone has come across this before and can help us.  I have looked at different sources to find the answer to this.  I called Adobe direct, and it was suggested that I try this forum.  Any help would this would be very appreciated.  Thank you.

    OK.  These are all of the screen shots with the settings.  I hope that you can find something.
    Thank you

  • Using a For Loop Index for Array Element Number?

    Hi.  Thanks in advance for the help.  I can't seem to find what I want to do here using the search function... probably because I don't know how to frame the question appropriately.  Ignore the title to this post cause it's probably wrong vocabulary for what I want to do.
    Here's the situation:
    I have a 2D array where the first column is the X data and each subsequent column is Y data (call it Y1...Yn).  The n-value varies from run to run (some runs have 4 columns of data, some have 20), but that is easily gathered when reading the data file.  I need to perform a number of operations on each set of data, the least of which is smoothing the data and graphing it, so I'm limiting my discussion to these 2 operations.
    What I want is a for loop structure where the indexing of the loop tracks the Y1...Yn columns, grabs each column for the iteration, performs the relevant analysis, and spits out the result, but in a stackable manner.  Thus the title; I want to use the for loop's index to mark the array element for building a new array.
    See the image attached.  A 2D array of 9 columns (X, Y1...Y8) is analyzed such that each data set, (X, Y1), (X, Y2)...(X, Y8) is bundled, graphed, run through a B-spline Fit, of which is also graphed.  I need to replace this with something that looks like the for loop structure shown.  
    I just don't know how to get those two data bundles [(X, Yi) and it's smoothed pair] out of the for loop in a stacked set from every iteration of the for loop.
    Again the title, I think I want to build a new array where i use the index of the for loop to control the entries of the new array.  But I can't see how to do that.
    Any help would be appreciated.
    Attachments:
    NeedForLoopForThis.PNG ‏30 KB

    Hello H.R. Dunham, and welcome to the forum!
    It seems that you may be looking for Auto-Indexing, a basic feature of loops in LabVIEW.  You'll need to transpose your array before wiring it into the for loop, as elements are auto-indexed by row before column, but at that point you should be able to operate on each column and output an array of n cluster elements corresponding to your input columns.  Auto-indexing tunnels look like brackets to indicate each element will be indexed automatically- this should be the default when wiring an array into a for loop or when wiring anything out of a for loop.
    As for how to build your pairs, I suggest removing the X column and creating a "starter" cluster containing your X data and placeholder Y data before entering your "Y" processing loop.  Use the bundle by name function in the for loop to insert your processed column data into the cluster and auto-index the cluster output. Flow would be something like this:
    1) Gather data
    2) Split X and Y using standard array operations
    3) Create "template" cluster with shared X data
    4) Pass template cluster and Y-column array into an auto-indexed for loop.
    5) Insert processed Y data into cluster inside loop.
    6) Auto-index cluster data out of loop.
    This tutorial is probably also a good place to get started:
    Getting Started with NI LabVIEW Module 3: Loops
    http://www.ni.com/white-paper/7528/en/
    Hope that helps!
    Regards,
    Tom L.

  • JDBC to  File Sender: Create Multiple Files

    Hi All,
    I have a requirement that I have to pick data form a SQL table and then based on the data in it I have to create multiple files using File receiver. Even the file name has to be derived from the data in the SQL table.
    e.g. The SELECT statement is fetchin 30 record and I have to make 3 files out iof it. Please suggest.
    regards,
    Piyush

    Hi,
    You can achieve without BPM, By using Enhance Interface Determination  i,e Multimapping without BPM.
    In additon you would required ASMA and dynamic configuration for this scenario.
    Regards,
    Abid

  • Acrobat 9 Pro - Batch Create Multiple Files from InDesign CS5 files

    When attempting to batch create PDFs from Indesign CS5 files using Acrobat Pro 9's File>Create PDF>Batch Create Multiple Files ... option the operation fails with the error 'Could not find the application that created this file: [path to file] Please select a file created by an application that resides on your computer.' as shown in the screenshot below:
    Acrobat 9 Professional was bundled with Creative Suite 5 Design Standard so shouldn't this work? My machine is running OS X 10.6.7, Acrobat Pro 9.44 and InDesign CS5 7.04.
    Any help to solve this issue would be most gratefully received - this feature had previously saved me a lot of time on my old machine with 10.5.8, Acrobat Pro 9 and CS4.

    I have uploaded the files and shared them.  These are the links
    Grade 11 Maths Standardisation Project Paper 2 2013.doc
    https://files.acrobat.com/preview/9694310d-ca7f-4919-883d-c53b36215d89
    Grade 11 Maths Standardisation Project Paper 2 Analysis Grid 2013.doc
    https://files.acrobat.com/preview/97da9e5f-d412-4d25-9bbc-d1a525d90826
    Grade 11 Maths Standardisation Project Paper 2 Diagram Sheet 2013.doc
    https://files.acrobat.com/preview/f50dd62e-af04-4060-85c5-fa81ce6803d8
    Grade 11 Maths Standardisation Project Paper 2 Formula Sheet 2013.doc
    https://files.acrobat.com/preview/7fc6007b-aaa6-4d65-9a8c-bf99818474a5
    Grade 11 Maths Standardisation Project Paper 2 Marking Guidelines 2013.doc
    https://files.acrobat.com/preview/b3a715bb-3683-48df-b0ec-3d17442275be
    Grade 11 Maths Standardisation Project Paper I Analysis Grid 2013.docx
    https://files.acrobat.com/preview/ab62e6b6-0261-434e-8a2f-382f74335685
    The first file is the problem file.  If you create this file separately, Acrobat will convert it perfectly.  But "Batch create multiple files" and the graphics are deconstructed on page 8

  • Exporting Layers to PNG files using each layer name to create the file name??

    Hi All
    I'm trying to sort the following problem and was hoping somebody here could help with a scripting solution - my knowledge extends as far as actions unfortunately - which I don't think is appropriate for this.
    I've created a User interface in Illustrator with many layers and have exported this as a psd with layers.
    Basically what i'm wanting to do is export every layer as a png file while using the layer name to create the file name - each layer needs to be clipped.
    There is no transparency in the png.
    I've run the export to files script - but the names are too long and there is no anti aliasing.
    I've tried running a script from Illustrator - but it doesn't see sub layers - and doesn't name the layers.
    any help would be appreciated.
    thanking you in advance
    regards
    nate

    Hi,
    We just released this tool: FERRY (http://ferry.thedamarmada.com). It does exactly what you want and a little bit more.
    I think it's worth it a try.
    It comes with a free demo that will export 5 layers.
    Take a look and let us know if it's what you need.
    It could be easily tweaked.
    Jordi

  • Batch create multiple files in a script

    I have 130,000 gif files I want to convert to pdf.  I can only batch convert about 1,500 at a time, acrobat will bomb out if I do more.  Is there a script I can use to process all my files ?
    Thanks,
    Alex

    I have uploaded the files and shared them.  These are the links
    Grade 11 Maths Standardisation Project Paper 2 2013.doc
    https://files.acrobat.com/preview/9694310d-ca7f-4919-883d-c53b36215d89
    Grade 11 Maths Standardisation Project Paper 2 Analysis Grid 2013.doc
    https://files.acrobat.com/preview/97da9e5f-d412-4d25-9bbc-d1a525d90826
    Grade 11 Maths Standardisation Project Paper 2 Diagram Sheet 2013.doc
    https://files.acrobat.com/preview/f50dd62e-af04-4060-85c5-fa81ce6803d8
    Grade 11 Maths Standardisation Project Paper 2 Formula Sheet 2013.doc
    https://files.acrobat.com/preview/7fc6007b-aaa6-4d65-9a8c-bf99818474a5
    Grade 11 Maths Standardisation Project Paper 2 Marking Guidelines 2013.doc
    https://files.acrobat.com/preview/b3a715bb-3683-48df-b0ec-3d17442275be
    Grade 11 Maths Standardisation Project Paper I Analysis Grid 2013.docx
    https://files.acrobat.com/preview/ab62e6b6-0261-434e-8a2f-382f74335685
    The first file is the problem file.  If you create this file separately, Acrobat will convert it perfectly.  But "Batch create multiple files" and the graphics are deconstructed on page 8

Maybe you are looking for