How to read a text file and write text file
Hello,
I have a text file A look like this:
0 0
0 A B C
1 B C D
2 D G G
10
1 A R T
2 T Y U
3 G H J
4 T H K
20
1 G H J
2 G H J
I want to always get rid of last letter and select only the first and last line and save it to another text file B. The output should like this
0 A B
2 D G
1 A R
4 T H
1 G H
2 G H
I know how to read and write a text file, but how can I select the text when I am reading a text file. Can anyone give me an example?
Thank you
If the text file A look like that
0 0
0 3479563,41166 6756595,64723 78,31 1,#QNAN
1 3479515,89803 6756588,20824 77,81 1,#QNAN
2 3479502,91618 6756582,6984 77,94 1,#QNAN
3 3479516,16334 6756507,11687 84,94 1,#QNAN
4 3479519,14188 6756498,54413 85,67 1,#QNAN
5 3479525,61721 6756493,89255 86,02 1,#QNAN
6 3479649,5546 6756453,21824 89,57 1,#QNAN
1 0
0 3478762,36013 6755006,54907 54,8 1,#QNAN
1 3478756,19538 6755078,16787 53,63 1,#QNAN
2 0
3 0
N 0
I want to read the line that before and after 1 0, 2 0, ...N 0 line to arraylist. I have programed the following code
public ArrayList<String>save2;
public BufferedWriter bufwriter;
File writefile;
String filepath, filecontent, read;
String readStr = "" ;
String[]temp = null;
public String readfile(String path) {
int i = 0;
ArrayList<String> save = new ArrayList <String>();
try {
filepath = "D:\\thesis\\Material\\data\\CriticalNetwork\\test3.txt";
File file = new File(filepath);
FileReader fileread = new FileReader(file);
BufferedReader bufread = new BufferedReader(fileread);
this.read = null;
// read text file and save each line content to arraylist
while ((read = bufread.readLine()) != null ) {
save.add(read);
// split each arraylist[i] element by space and save it to String[]
for(i=0; i< save.size();i++){
this.temp = save.get(i).split(" ") ;
// if String[] contain N 0 such as 0 0, 1 0, 2 0 then save its previous and next line from save arraylist to save2 arraylist
if (temp.equals(i+"0")){
this.save2.add(save.get(i));
System.out.println(save2.get(i));
} catch (Exception d) {
System.out.println(d.getMessage());
return readStr;
My code has something wrong. It always printout null. Can anyone help me?
Best Regards,
Zhang
Similar Messages
-
Read PDF Formatted Spool and write PDF File to Application Server
Hi Experts,
After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
PARAMETERS : p_spono LIKE tsp01-rqident.
DATA: pdf_data type FPCONTENT.
types: lt_pdf_table(1000) type x.
data: l_pdf_data type standard table of lt_pdf_table,
l_pdf_line type lt_pdf_table,
l_offset type i,
l_len type i,
p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
*Read the spool content
CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
EXPORTING
i_spoolid = p_spono
i_partnum = '1'
IMPORTING
e_pdf = pdf_data
* e_pdf_file = file
EXCEPTIONS
ads_error = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
* Modify the spool contents to prepare internal table
l_len = xstrlen( pdf_data ).
while l_len >= 1000.
l_pdf_line = pdf_data+l_offset(1000).
append l_pdf_line to l_pdf_data.
add 1000 to l_offset.
subtract 1000 from l_len.
endwhile.
if l_len > 0.
l_pdf_line = pdf_data+l_offset(l_len).
append l_pdf_line to l_pdf_data.
endif.
* GUI DOWNLOAD Works Fine
* Now pdf contents is ready , lets store in local PC
*CALL FUNCTION 'GUI_DOWNLOAD'
* EXPORTING
* filename = 'C:\Documents and Settings\Desktop\shital.pdf'
* filetype = 'BIN'
* TABLES
* data_tab = l_pdf_data.
OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
IF sy-subrc <> 0.
MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
' Error opening file:'(Z03) p_file.
ENDIF.
LOOP AT l_pdf_data INTO l_pdf_line.
TRANSFER l_pdf_line TO p_file.
ENDLOOP.
CLOSE DATASET p_file.
IF sy-subrc <> 0.
MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
' Error closing file:'(Z04) p_file.
ENDIF.
Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
Let me know if you require further details about the issue.
Regards
Shital
Edited by: shital phadake on Apr 8, 2009 9:39 PMThanks Selçuk for your reply and taking time for understanding the Issue,
I went thru Functionality of the program you suggested but dont think it matches my requirement.
Regards
Shital -
How to read from one file and write into another file?
Hi,
I am trying to read a File and write into another file.This is the code that i am using.But what happens is last line is only getting written..How to resolve this.the code is as follows,
public String get() {
FileReader fr;
try {
fr = new FileReader(f);
String str;
BufferedReader br = new BufferedReader(fr);
try {
while((str= br.readLine())!=null){
generate=str;
} catch (IOException e1) {
e1.printStackTrace();
} }catch (FileNotFoundException e) {
e.printStackTrace();
return generate;
where generate is a string declared globally.
how to go about it?
Thanks for your reply in advanceIf you want to copy files as fast as possible, without processing them (as the DOS "copy" or the Unix "cp" command), you can try the java.nio.channels package.
import java.nio.*;
import java.nio.channels.*;
import java.io.*;
import java.util.*;
import java.text.*;
class Kopy {
* @param args [0] = source filename
* args [1] = destination filename
public static void main(String[] args) throws Exception {
if (args.length != 2) {
System.err.println ("Syntax: java -cp . Kopy source destination");
System.exit(1);
File in = new File(args[0]);
long fileLength = in.length();
long t = System.currentTimeMillis();
FileInputStream fis = new FileInputStream (in);
FileOutputStream fos = new FileOutputStream (args[1]);
FileChannel fci = fis.getChannel();
FileChannel fco = fos.getChannel();
fco.transferFrom(fci, 0, fileLength);
fis.close();
fos.close();
t = System.currentTimeMillis() - t;
NumberFormat nf = new DecimalFormat("#,##0.00");
System.out.print (nf.format(fileLength/1024.0) + "kB copied");
if (t > 0) {
System.out.println (" in " + t + "ms: " + nf.format(fileLength / 1.024 / t) + " kB/s");
} -
How do I migrate files from an external hard drive created in a Windows OS to a new MAC external drive? I want to read and write these files to the new drive.
LKrzesowski wrote:
How do I migrate files from an external hard drive created in a Windows OS to a new MAC external drive? I want to read and write these files to the new drive.
If all you're trying to do is move the files from the Windows external to the Mac external, you can simply connect them both to the Mac and drag the files from the Windows drive to the Mac drive. If you want to move the files back and forth between them, you'll need to establish the format of the Windows external. Macs can read and write to FAT32 and exFAT (which can handle files larger than 4GB) formatted drives but can only read NTFS formatted drives without additional software. With the Windows drive connected, you can check its format with Disk Utility. -
How can I read and write text in rings that are inside an array?
Hello All!!!
How can I read and write text in rings that are inside an array?
Regards and thanks in advance.Use a Property Node linked to the Ring inside the array.
Of course, all elements in the array will have the same text values.
B-)
Message Edited by LabViewGuruWannabe on 12-13-2007 09:47 AM
Message Edited by LabViewGuruWannabe on 12-13-2007 09:48 AM
Message Edited by LabViewGuruWannabe on 12-13-2007 09:49 AM
Attachments:
Strings-BD.PNG 17 KB
Strings-FP1.PNG 23 KB -
How to read from excel file and write it using implicit jsp out object
our code is as below:Please give us proper solution.
we are reading from Excel file and writing in dynamicaly generated Excel file.it is writing but not as original excel sheet.we are using response.setContentType and response.setHeader for generating pop up for saveing the original file in to dynamically generated Excel file.
<%@ page contentType="application/vnd.ms-excel" %>
<%
//String dLoadFile = (String)request.getParameter("jspname1");
String dLoadFile = "c:/purge_trns_nav.xls" ;
File f = new File(dLoadFile);
//set the content type(can be excel/word/powerpoint etc..)
response.setContentType ("application/msexcel");
//get the file name
String name = f.getName().substring(f.getName().lastIndexOf("/") + 1,f.getName().length());
//set the header and also the Name by which user will be prompted to save
response.setHeader ("Content-Disposition", "attachment; filename="+name);
//OPen an input stream to the file and post the file contents thru the
//servlet output stream to the client m/c
FileInputStream in = new FileInputStream(f);
//ServletOutputStream outs = response.getOutputStream();
int bit = 10;
int i = 0;
try {
while (bit >= 0) {
bit = in.read();
out.write(bit) ;
} catch (IOException ioe) { ioe.printStackTrace(System.out); }
out.flush();
out.close();
in.close();
%>If you want to copy files as fast as possible, without processing them (as the DOS "copy" or the Unix "cp" command), you can try the java.nio.channels package.
import java.nio.*;
import java.nio.channels.*;
import java.io.*;
import java.util.*;
import java.text.*;
class Kopy {
* @param args [0] = source filename
* args [1] = destination filename
public static void main(String[] args) throws Exception {
if (args.length != 2) {
System.err.println ("Syntax: java -cp . Kopy source destination");
System.exit(1);
File in = new File(args[0]);
long fileLength = in.length();
long t = System.currentTimeMillis();
FileInputStream fis = new FileInputStream (in);
FileOutputStream fos = new FileOutputStream (args[1]);
FileChannel fci = fis.getChannel();
FileChannel fco = fos.getChannel();
fco.transferFrom(fci, 0, fileLength);
fis.close();
fos.close();
t = System.currentTimeMillis() - t;
NumberFormat nf = new DecimalFormat("#,##0.00");
System.out.print (nf.format(fileLength/1024.0) + "kB copied");
if (t > 0) {
System.out.println (" in " + t + "ms: " + nf.format(fileLength / 1.024 / t) + " kB/s");
} -
Find a string in a file and write a new text after it
hi
i try to search a string in a small text file. after this position I should write a new text (it is not the end of the text, it could be somewhere between).
I tried to solve this with the StrginTokenizer, but it does not work properly, any other ideas how to solve this?
thanks for your comments
steinfresserTo insert text into the middle of a file you use the process that has been used since the first text editor was invented over 50 years ago:
1. Read the text from the file up to the insert point, and write it to a new file.
2. Write the inserted text to the new file.
3. Read the rest of the text from the file, and write it to the new file.
4. Delete the file.
5. Rename the new file. -
Reading Data from Unix file and write into an Internal table
Dear all,
I am having an requirement of reading data from unix file and write the same into an internal table..how to do that ...experts please help me in this regard.Hi,
do like this
PARAMETERS: p_unix LIKE rlgrap-filename OBLIGATORY.
DATA: v_buffer(2047) TYPE c.
DATA: BEGIN OF i_buffer OCCURS 0,
line(2047) TYPE c,
END OF i_buffer.
* Open the unix file..
OPEN DATASET p_unix FOR INPUT IN TEXT MODE.
<b>IF sy-subrc NE 0.
*** Error Message "Unable to open file.
ELSE.</b>
DO.
CLEAR: v_buffer.
READ DATASET p_unix INTO v_buffer.
IF sy-subrc NE 0.
EXIT.
ENDIF.
MOVE v_buffer TO i_buffer.
APPEND i_buffer.
ENDDO.
ENDIF.
CLOSE DATASET p_unix.
<b>Reward points if it helps,</b>
Satish -
Reading an XML file and write the contents to another xml file in java
Hi,
I am new to xml parsing.My requirement is that I am getting a message (xml) using ibm MQ in the ByteArrayInputStream format.I have to read this xml message and write to another file.
I am creating a POC for this.
First I used simple reading and writing concept but the output is "java.io.FileInputStream@3e25a5 "
Sample xml file
- <Client>
<ClientId>1234</ClientId>
<ClientName>STechnology</ClientName>
<DTU_ID>567</DTU_ID>
<ClientStatus>ACTIVE</ClientStatus>
- <LEAccount>
<ClientLE>678989</ClientLE>
<LEId>56743</LEId>
- <Account>
<AccountNumber>9876543678</AccountNumber>
</Account>
</LEAccount>
- <Service>
<Cindicator>Y2Y</Cindicator>
<PrefCode>980</PrefCode>
<BSCode>876</BSCode>
<MandatoryContent>MSP</MandatoryContent>
</Service>
</Client>
code:
import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class ByteArrayInputStreamToXml {
public static void main(String srg[]) throws IOException{
InputStream inputStream= new FileInputStream("C:\\soft\\test2\\sample1.xml");
byte currentXMLBytes[] = inputStream.toString().getBytes();
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(currentXMLBytes);
OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
int read=0;
byte[] bytes = new byte[1024];
while((read = byteArrayInputStream.read(bytes))!= -1){
out.write(bytes, 0, read);
out.write( '\n' );
inputStream.close();
out.flush();
out.close();
System.out.println("New file created!");
Please suggest me how can I use DOM/SAX parser ,I can see several code on net for reading xml file using SAX/DOM parser but writing an xml file after reading it using ByteArrayInputStream I am not getting .A help through some example Link will also be helpful for me.
Thanks
Sumit
Edited by: user8687839 on Apr 30, 2012 2:37 AM
Edited by: user8687839 on Apr 30, 2012 2:43 AMThanks I got the result.
package com.sumit.collections;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class ByteArrayInputStreamToXml {
public static void main(String srg[]) throws IOException{
InputStream inputStream= new FileInputStream("C:\\soft\\test2\\sample1.xml");
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
int nRead; byte[] data = new byte[1024];
while ((nRead = inputStream.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, nRead); } buffer.flush();
byte currentXMLBytes[]= buffer.toByteArray();
/* byte currentXMLBytes[] = inputStream.toString().getBytes();*/
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(currentXMLBytes);
OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
int read=0;
byte[] bytes = new byte[1024];
while((read = byteArrayInputStream.read(bytes))!= -1){
out.write(bytes, 0, read);
out.write( '\n' );
inputStream.close();
out.flush();
out.close();
System.out.println("New file created!");
} -
Read a doc file and write back to a doc file
How to read line by line from a doc file and then arrange it.
Like-->
amit
sumit
prem
jeev
these four names are present in the doc file. Now how to read by means of java program and sort these names and write back to a new doc file?????
What packages and methods are to be used??
Please help.....
Edited by: Jaguar on Apr 11, 2011 12:16 AMJaguar wrote:
How to read line by line from a doc file and then arrange it.By 'doc' do you mean MS Word?
these four names are present in the doc file. Now how to read by means of java program and sort these names and write back to a new doc file?????You seem to have a sticky '?' key and an unreliable shift key (to apply an upper case letter to the start of every sentence). Please fix them. -
Re: want to read in from file and write to components like textfield
I have a file that has been written using PrintWriter
The file is written with only the escape character '\t'
formating and not '\n'
here is 'file.txt':
s a Alan Credit Account 333333 55555 3 March 1972 20000.0 mmilo
I now want to read this and write to various components eg. Textfield
textfield.setText(readinText);
The file is written with these commands:
myprint.print(initials);
myprint.print('\t');
myprint.print(surname);
myprint.print('\t');
so basicly initials '\t' surname '\t' card type '\t' etc
How can I read this file and write to the components?
I am thinking of using BufferedReader
is this o.k?
String str;
try
{ BufferedReader myinp;
myinp = new BufferedReader( new FileReader("file.txt"));
while ((str = myinp.readLine()) !=null)
{ //this is where I need help, given that i have
// just read in a line how can I seperate it
// i.e initials, surname, card type etc?
// please help
myinp.close();
catch(IOException e)
{ System.err.println("Exception: " + e.getMessage());
System.exit(1);
}Hi,
1. read in the whole file in a string
2. then do the following - lets say s is your readin string
StringTokenizer st = new StringTokenizer(s,"\t");
the StringTokenizer separates that automatically for you - every call to st.nextToken() returns a string with one "value", the "\t" is not returned. Let's say you have 4 JTextFields called tf1 to tf4 and you want to fill in the 4 values from the StringTokenizer
tf1.setText(st.nextToken());
tf2.setText(st.nextToken());
tf3.setText(st.nextToken());
tf4.setText(st.nextToken());
how many values are readable by nextToken()-calls are returned by st.getTokenCount() and you can ask if there are more to read by st.hasMoreTokens() which return a boolean.
greetings Marsian -
how to get all how to get all paragraphs style and their fonts of a indesign file and write all info with para info into txt file with scriptingstyle and their fonts of a indesign file and write all info with para info into txt file with scripting
I write the script this one works
var par=doc.stories.everyItem().paragraphs.everyItem().getElements();
for(var i=par.length-1;i>=0;i--)
var font=par[i].appliedParagraphStyle.name;
var font1=par[i].appliedFont.name;
var size=par[i].pointSize;
WriteToFile (par[i].contents + "\r" + "Style : " + font + "\r" + "FONT1 : " + font1 + "\r" + "Size : " + size + "\r", reportFilePath);
function WriteToFile(text, reportFilePath) {
file = new File(reportFilePath);
file.encoding = "UTF-8";
if (file.exists) {
file.open("e");
file.seek(0, 2);
else {
file.open("w");
file.writeln(text);
file.close();
Thanks for all your support -
Using an array to read from and write to files
my problem is, I do not know how to do this program, it's like an inventory warehouse program that uses an array to store the items, then I have to use a keyboard input to run through the program the first time, using a write method to save the file, and a read method to go through the program a second time and resave it to a different file with the write method, I've asked countless times for help, but the instructor just won't help, so I was hoping I could get some help here, and if I don't get this done, I'm going to end up failing the class.
also, the requirements are listed here as well, so it can be better understood.
Write a program that:
1. allows the user to choose whether the inventory data comes from a file or from the keyboard
2. allows for up to 20 inventory items
3. if the data comes from the keyboard, asks for all inventory information (item name, number in stock,
initial warehouse, and value of one item)
4. if the data comes from a file, displays the inventory information for the item.
5. for each item, asks the user how many items to add or delete from inventory
6. determines whether an item must be moved to a different warehouse and changes the location if
necessary (note, it may be necessary to move an item to a smaller warehouse)
7. once all inventory changes have been made, for each warehouse displays the items in the warehouse, the
total number of items in the warehouse, and the total value of the items in the warehouse.
8. once all inventory changes have been made, stores the item information in a file (which can be used for
the next program run)
9. asks the user for the names of the input file (if data is coming from a file) and the output file (always).
p.s. I can post the source code for it if it's required for the help.
Thanks,
Xandlermy specific question is how I would go about using the scanner utility to tell it to input from the file or keyboard, if from keyboard it's manually item information is done manually, if from file it asks the user for the file name and the user selects it, then it saves it to a file, can't really post what I've tried because that's the problem, I don't know how to go about doing it and the instructor won't help me, I know though that it requires a file read method for the 2nd run, and a keyboard input for the first and a write for the saving of the file(s).
Thanks,
Xandler -
File Read and Write using File Adapter in Bpel
In Bpel Process i am using File Adapter ( Schema is Opaque) for read and write the file contents. i am able do successful deployment and read, write function in first time deployment, after that again i tired to run the application, its not going to write the content of file, its only writing the file with out data's or content in that file.
Please help me...
SaravananHi Eric
In my domain.log file having the following details. In this file im unable to find out what the exact problem. Please look at this and help me.
<2008-01-22 18:25:42,024> <INFO> <default.collaxa.cube.compiler> validating "C:\product\10.1.3.1\OracleAS_1\bpel\domains\default\tmp\.bpel_BPELProcess2_1.1_298e83988d77b6640c33dfeec11ed31b.tmp\BPELProcess2.bpel" ...
<2008-01-22 18:25:49,850> <INFO> <default.collaxa.cube.engine.deployment> <CubeProcessFactory::generateProcessClass>
Process "BPELProcess2" (revision "1.1") successfully compiled.
<2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Loading JCAActivationAgent for {portType=Read_ptt}
<2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Locating Adapter Framework instance: OraBPEL
<2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Done loading JCAActivationAgent for processId='bpel://localhost/default/BPELProcess2~1.1/
<2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.engine.deployment> Process "BPELProcess2" (revision "1.1") successfully loaded.
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::uninit Shutting down the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.0/', activation properties={portType=Read_ptt}
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - performing endpointDeactivation for portType=Read_ptt, operation=Read
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Endpoint De-activation called in adapter for endpoint : D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::init - Initializing the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.1/
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::initiateInboundJcaEndpoint - Creating and initializing inbound JCA endpoint for:
process='bpel://localhost/default/BPELProcess2~1.1/'
domain='default'
WSDL location='rd.wsdl'
portType='Read_ptt'
operation='Read'
activation properties={portType=Read_ptt}
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - endpointActivation for portType=Read_ptt, operation=Read
<2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Endpoint Activation called in File Adapter for endpoint: D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
<2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - successfully completed endpointActivation for portType=Read_ptt, operation=Read
<2008-01-22 18:26:02,890> <WARN> <default.collaxa.cube.activation> <File Adapter::Inbound> PollWork::run exiting, Worker thread will die
<2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Managed Connection Created
<2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Connection Created
<2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> FileInteraction Created -
How to read multiple files and generate multiple files
Dear all, I would like to process some LTE measurement files. Currently I can only load a single file and process the data and save it to a single binary file. Since I would like to run the code continously, could someone show me how I can modify the code to load multiple files and specify multiple files to save the process the data please? I have attached the code to the question. Many thanks for your help.
Attachments:
RF Analyze IQ File.vi 46 KBThere is no official "bin" format and I am confused by some of your statements:
Kiwibunny wrote:
Currently I can only load a single file and process the data and save it to a single binary file. Since I would like to run the code continously, could someone show me how I can modify the code to load multiple files and specify multiple files to save the process the data please? I have attached the code to the question. Many thanks for your help.
What you could do is use "list folder" with *.bin as pattern, and use a FOR loop and iterate over all *.bin files found in a selected folder.
In any case, your code uses some weird constructs and you seem to do way to much. Are you using "continuous run" mode? Don't!
Use a proper state machine instead ot these stalling loops. Why do you need to query the queue after each enqueue? Why do you need a queue at all?
LabVIEW Champion . Do more with less code and in less time .
Maybe you are looking for
-
JSP Strange error...
Hi all, I've a problem with my jsp. When I first run my script on the browser it works fine. But when I refresh it, I always got this message: "Application Error" Return Error Message: 0 I really don't know what is the error? Can somebody enlightened
-
Hello: This forum has been an asset for me in learning Oracle... just wanted to say to all you at Oracle Inc. congratulations. So, onto my question. I purchased a copy of 9i database software used. And i can't determine if i can use it for production
-
My 3g data connection with 3uk is much faster both upload and download than I can get on my home broadband, but the settings only allow saving to skydrive via wifi using best quality. Is there any way of changing this so I can upload via 3g (4 time's
-
Safari 4.0 - resize tabs, to have them as in 3.x?
Hello, is there a possibility to change the size of the tabs permanently, I would like to have them smaller, and always the same size, as in Safari 3.x
-
Is there a spell check feaure for SMS on the 8310 or or only for Emails? i know there is a feature of autocorrect as discussed in other thread but how about spellcheck?