How to read an html file and replace a text using text_io

hi,
i want ro read an html file using text_io and replace a particular text with a new text
eg: i want to replace a text called "data.js" and with "maps.js"
how do i do this?

You have to write your own code to do that. TEXT_IO is just a low level text file interface.
You need to read in all the text, save it in some internal format (array of varchar2's maybe or in the DB) and then perform a search on the text you have read in, find out where the instances of "data.js" are located and substitute them with "maps.js" After that you need to write to a new file and delete the old one. There is no way to search and replace inside the existing file (what's sometimes referred to as 'in-place' substitution).
See the help section called About the TEXT_IO package for an overview of how it works and some code examples.

Similar Messages

  • How can one  read a Excel File and Upload into Table using Pl/SQL Code.

    How can one read a Excel File and Upload into Table using Pl/SQL Code.
    1. Excel File is on My PC.
    2. And I want to write a Stored Procedure or Package to do that.
    3. DataBase is on Other Server. Client-Server Environment.
    4. I am Using Toad or PlSql developer tool.

    If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
    1. Get your DBA to create directory object in oracle using the following command:
    create directory TEST_DIR as ‘directory_path’;
    Note: This directory is on the server.
    2. Grant read,write on directory directory_object_name to username;
    You can find out the directory_object_name value from dba_directories view if you are using the system user account.
    3. Logon as the user as mentioned above.
    Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
    function getData(p_filename in varchar2,
    p_filepath in varchar2
    ) RETURN VARCHAR2 is
    input_file utl_file.file_type;
    --declare a buffer to read text data
    input_buffer varchar2(4000);
    begin
    --using the UTL_FILE in built package
    input_file := utl_file.fopen(p_filepath, p_filename, 'R');
    utl_file.get_line(input_file, input_buffer);
    --debug
    --dbms_output.put_line(input_buffer);
    utl_file.fclose(input_file);
    --return data
    return input_buffer;
    end;
    Hope this helps.

  • How to read an ascii file and record data in a 2d array

    HI everyone,
    I have an experimental data file in ascii format. It contains 10 data sets.
    I'm trying to read the ascii file and record data in a 2d array for further analysis,
    but I still could not figure it out how to do it.
    Please help me to get this done.
    Here I have attaced the ascii file.
    -Sam
    Attachments:
    data.asc ‏123 KB
    2015-01-27_18-01-31_fourier_A2-F-abs.zip ‏728 KB

    Got it!
    Thank you very much !
    -Pamsath

  • How To read lib*.so files and verbose its content

    Hi
    Is there any command with which we can read shared library files and see whats its contents are i.e. whats are the functions available inside it and how its control flow.
    Regards
    Jeet

    I know of none that shows flow control but you can do a man against nm(1) to see what is in the library (nm libc.so.1).

  • 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");
    }

  • How to read the data file and write into the same file without a temp table

    Hi,
    I have a requirement as below:
    We are running lockbox process for several business, but for a few businesses we have requirement where in we receive a flat file in different format other than how the transmission format is defined.
    This is a 10.7 to 11.10 migration. In 10.7 the users are using a custom table into which they are first loading the raw data and writing a pl/sql validation on that and loading it into a new flat file and then running the lockbox process.
    But in 11.10 we want to restrict using temp table how can we achieve this.
    Can we read the file first and then do validations accordingly and then write to the same file and process the lockbox.
    Any inputs are highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

    Hello Gurus,
    Let me tell you about my requirement clearly with an example.
    Problem:
    i am receiving a dat file from bank in below format
    105A371273020563007 07030415509174REF3178503 001367423860020015E129045
    in this detail 1 record starting from 38th character to next 15 characters is merchant reference number
    REF3178503 --- REF denotes it as Sales Order
    ACC denotes it as Customer No
    INV denotes it as Transaction Number
    based on this 15 characters......my validation comes.
    If i see REF i need to pick that complete record and then fill that record with the SO details as per my system and then submit the file for lockbox processing.
    In 10.7 they created a temporary table into which they are loading the data using a control file....once the data is loaded into the temporary table then they are doing a validation and updating the record exactly as required and then creating one another file and then submitting the file for lockbox processing.
    Where as in 11.10 they want to bypass these temporary tables and writing it into a different file.
    Can this be handled by writing a pl/sql procedure ??
    My findings:
    May be i am wrong.......but i think .......if we first get the data into ar_payments_interface_all table and then do the validations and then complete the lockbox process may help.
    Any suggestions from Oracle GURUS is highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

  • 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 advance

    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");
    }

  • How to read in a file and change the column attributes

    Hi,
    I'm new to java and i'm stuggling to find a way to read in a text file and perform calculations on the data, such as to normalise it.
    What in want to do is normalise the data by finding the greatest value in a column and then divide all the other values in the column with that value.
    I know how to read a file in and store each line in a vector but for this problem i think i need to store each column in an array, but i'm not sure how to do this.
    Can anyone help please?
    Thanks

    Hi,
    I'm new to java and i'm stuggling to find a way to
    read in a text file and perform calculations on the
    data, such as to normalise it.
    What in want to do is normalise the data by finding
    the greatest value in a column and then divide all
    the other values in the column with that value.
    I know how to read a file in and store each line in a
    vector but for this problem i think i need to store
    each column in an array, but i'm not sure how to do
    this.
    Can anyone help please?
    ThanksI think this should work but I wrote it out without completely thinking about it (hopefully to get things started).
    So if you had this:
    age height earnings
    0 2 100
    1 3 50
    2 1 0
    For the age column you'd take 2 as the largest and then divide 0 and 1 by two to get 0, .5.
    First build up test files that seperate the columns in different ways. With spaces, tabs, and the ASCI Control character for null ( I think it's 0 ). Your program should detect
    numbers and spaces, tabs control character, commas and periods (for money). Because numbers don't have spaces it should be easy to keep track of which column
    you're in.
    Store each line into a 3D String array with each index containing a String built up from the chars scanned in on each line, when a blank area is found followed by another
    number iterate the column index. When you come to the end of the line set column == 0 and row+1.
    private String[][][] test = new String[2][6][1];
    20     3      11      14      44       0
    4      5       7      80      91      49
    test[0][0][0] would be row 1 col 1 value 1 ((20))
    test[0][1][0] would be r1, c2, v1 ((3))
    test[1][0][0] would be r2, c1, v1 ((4))
    test[1][2][0] would be r2, c3, v1 ((7))
    test[1][5][0] would be r2, c6, v1 ((49))
    package source.Final;
    import javax.swing.*;
    import java.io.*;
    public class S7
         public static void main(String[] args)
              getContents();
              System.exit(0);
         public static void getContents()
              String lineSep = System.getProperty("line.separator");
              char c = ' ';
              int iterator = 0;
              int i = 0;
              int charNum = 1;
              int lineCount = 1;
             //declared here only to make visible to finally clause
             BufferedReader input = null;
             BufferedWriter out = null;
             try {
                         String line = null;
                          * This implementation reads / writes one line at a time
                          * using the buffered reader / writer Java classes.
                         input = new BufferedReader( new FileReader( "C:\\Scan file test\\Read\\test1.txt" ));
                           out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Read\\test2.txt" ));
                         //input = new BufferedReader( new FileReader( "C:\\Scan file test\\Read\\booked_policies1.txt" ));
                           //out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Write\\booked_policies1.txt" ));
                         //input = new BufferedReader( new FileReader( "C:\\Scan file test\\Read\\booked_policies2.txt" ));
                           //out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Write\\booked_policies2.txt" ));
                         //input = new BufferedReader( new FileReader( "C:\\Scan file test\\Read\\booked_policies3.txt" ));
                           //out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Write\\booked_policies3.txt" ));
                         out.write( "Character\tLine Number\tCharacter Number\tAscii Value" + lineSep );                     
                              while (( line = input.readLine()) != null)
                              i = 0;
                              charNum = 1;
                              iterator = 0;
                              while( i < line.length() )
                                               c = line.charAt(iterator);                                             
                                            if( (int)c == 0 || (int)c == 9 )
                                                 break;
                                            else if( c >= '[' && c <= '_')
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c <  ' ' )// && (int)c != 0 && (int)c != 9  )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c >  ';' && c <= '@' && c != '=')
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c >= '!' && c < '"' )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c >  'z' && c < '~' )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c == '%' )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c >  '~' )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            charNum += 1;
                                               iterator += 1;
                                               i++;
                                    lineCount += 1;
             catch (FileNotFoundException ex) {ex.printStackTrace();     System.out.println("File not found.");}
                 catch (IOException ex){ex.printStackTrace();               System.out.println("IO Error.");}
             finally{ try{ if( input != null ) input.close();                if( out != null ) out.close();}
                    catch (IOException ex){ex.printStackTrace();        System.out.println("IO Error #2.");}
        }

  • How to read a CSV file and Insert data into an Oracle Table

    Hi All,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .
    Please let me some suggestions on this.
    Thanks,
    Chandra R

    jeneesh wrote:
    And, please don't "hijack" 5 year old thread..Better start a new one..I've just split it off to a thread of it's own. ;)
    @OP,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .You don't have a "clob file" as there's no such thing. CLOB is a datatype for storing large character based objects. A file is something on the operating system's filesystem.
    So, why have you stored comma seperated data in a CLOB?
    Where did this data come from? If it came from a file, why didn't you use SQL*Loader or, even better, External Tables to read and parse the data into structured format when populating the database with it?
    If you really do have to parse a CLOB of data to pull out the comma seperated values, then you're going to have to write something yourself to do that, reading "lines" by looking for the newline character(s), and then breaking up the "lines" into the component data by looking for commas within it, using normal string functions such as INSTR and SUBSTR or, if necessary, REGEXP_INSTR and REGEXP_SUBSTR. If you have string data that contains commas but uses double quotes around the string, then you'll also have the added complexity of ignoring commas within such string data.
    Like I say... it's much easier with SQL*Loader of External Tables as these are designed to parse such CSV type data.

  • How to Read from two file and write to another file --Please help !!

    Hi all,
    Please suggest me where i'm goin goin wrng.
    I have 2 flat files. one of them is the main file(Ann.dat) has a about 150,000 lines (each line has unique ID from 00001 to 45000) of data and the the other(Miss.dat) has a just a list of IDs that are no longer in use & have to be deleted from the first file(NewAnn.dat). (Note that Ann.dat is a tab delimitted file and Miss.dat is just a list of all invalid IDs)
    Below is my code. It doesn't do what I'm supposed to. Please suggest me or help me with a code to do it. What I'm trying to do is read each of the lines from the 2 files compare the ID in ann.dat with all the IDs in Miss.dat & if it doesn't match with the ID in Miss.dat write the whole line to NewAnn.dat. And do the rest with all the lines in Ann.dat.
    It could be a real dumb question. since i'm not a software professional, I consider myself to be newbie to programming. I desperately need your help.
    import java.io.*;
    import java.util.*;
    public class anntemp{
         public static void main(String[] args)
              String keyAnn ="";
              String keyMis="";
              String recAnn =null;
              String recMis =null;
              try{               
              FileReader fr=new FileReader("C:\\Tom\\Ann.dat");
              BufferedReader br=new BufferedReader(fr);
              int couter=0;
              while ((recAnn = br.readLine())!=null)
                   couter++;
                   keyAnn = recAnn.substring(0, recAnn.indexOf("\t"));
              FileReader fr1=new FileReader("C:\\Tom\\Miss.dat");
              BufferedReader br1=new BufferedReader(fr1);
              while((recMis = br1.readLine())!=null){
              keyMis = recMis.substring(0, recMis.indexOf("\t"));
                   if(keyAnn.equals(keyMis)){
         FileWriter fw=new FileWriter("C:\\Tom\\NewAnn.dat",true);
         BufferedWriter bw=new BufferedWriter(fw);
         PrintWriter pw=new PrintWriter(bw);
         StringBuffer writeValue = new StringBuffer();
         writeValue.append(recAnn);
                                                 pw.println(writeValue.toString());
         pw.flush();
              }catch (Exception expe){
                   System.out.println("In Exception ");
                   expe.printStackTrace();
    Thank you all in advance,
    br

    I think you need to close the files when you are done in the inner loop. Plus I think you'll be overwritting the file in the inner loop if more than one match. It might be easier to read the unused id file into a map at the start, and then loop up the id's from the master file in the map. You can put the unused id's in as the keys, and a Boolean.TRUE as the value (value won't matter). Then just check if the map contains the key for the id read from the master file. That should cut down on disk activity. This assumes the unused id file is smallish.

  • How to read the source file and copy the entire content to the target Database field

    Hi All,
    PI system extracts the actual business content from the incoming attachment file and copy the entire format to the target Database field which is a blob data type field.
    Sender Adapter: SOAP
    Receiver Adapter: JDBC
    JDBC Structure
    Can we achived the above requirement by using UDF with out Java Mapping?
    Thanks,
    Mahi.

    Ok, in this case yo can use the conten converion of the file adapter. Therefore you first need to create a Datatype in ESR with the required structure
    Then in your file adapter you need to use this datatype and its required fields:
    The Datatype then can be used as usual within you mapping.
    regards
    Christian

  • How to read an excel file which contains multiple tabs using File adapter

    Hi BPEL gurus,
    I have a requirement where i need to read an EXCEL file, which has three tabs inside the file. All the three tabs has data in it. I have seen few examples where file adapter reads an excel file with data present inside a single tab but not with multiple tabs.
    If anyone has worked on this scenario, please provide your suggestions/inputs/links etc.
    Thanks in advance

    hi Sathish,
    this might help
    PI/XI: Reading MS Excel's XLSX and XLSM files with standard PI modules - easily...
    thanks and regards,
    Praveen T

  • How to read a txt file and update DB table

    I have to read a table which has some entries in it as plain text file, then I should update my table if the table entries and the data in text file are NOT MATCHING o.w. keep the table entry as it is

    It will helps to u
    data : begin of t_temp occurs 0,
             text(256),
           end of t_temp.
    data : s_file type string.
    SELECTION-SCREEN BEGIN OF BLOCK B1  WITH FRAME  TITLE TEXT-S01.
    PARAMETER: P_FILE LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN : END OF BLOCK B1.
    clear s_file.
    move p_file to s_file.
    uploade SOURCE file to t_tab1
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = s_file
        FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
             HEADER_LENGTH                 = 0
             READ_BY_LINE                  = 'X'
             DAT_MODE                      = ' '
             CODEPAGE                      = ' '
             IGNORE_CERR                   = ABAP_TRUE
             REPLACEMENT                   = '#'
             CHECK_BOM                     = ' '
           IMPORTING
             FILELENGTH                    =
             HEADER                        =
      TABLES
        DATA_TAB                      = t_temp
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Text deleted by Moderator.  Do NOT request points
    Regards
    Saimedha

  • How to read from input file and pass to script

     How can I get rid of the hard coded PATH statement and feed script based upon text file input.
       Input is contained in a file..
    'C:\cntprocess\   called sistemfolder.txt that has 2 fields folder
    then shortname.
    example:
     C:\cntprocess\REW1___1~Rew1
     C:\cntprocess\REW2___1~Rew2
     I want the first part in each record passed to script for processing
    C:\cntprocess\REW1___1
    C:\cntprocess\REW2___1
    Pass those values to this Script: I want values from above passed to the $Path
    $path='C:\Sistemi\'
    get-childitem -path $path *.spx | % {
    " Starting File Process....." >> $path\sistem.log
    $PDate = get-date
    $date = get-date -uformat "_%d_%m_%Y_%H%M%S.bak"
    #"Set backup date to $date" >> $path\sistem.log
    $newname=($_.fullname -replace ".spx",$date)
    $file = [System.IO.Path]::GetFileNameWithoutExtension($_.fullname)
    "File backup name is $newname" >> $path\sistem.log
    Rename-Item $_.fullname $newname
    "Renamed file to $newname" >> $path\sistem.log
    $lines = get-content $newname
    foreach ($line in $lines)
    $line + " " + [System.IO.Path]::GetFileNameWithoutExtension($_.fullname) | Out-File "$path\sistem.csv" -append
    Write-Host $_.fullname
    "Files Processed on $PDate are $newname " >> $path\sistem.log
    Thanks.

    OK, I was mistaken a bit on what I originally told you. After you run the command of
    $myFile = Import-Csv -Delimiter '~' -Path $path -Header Path, ShortName
    $myFile is actually an array of PSCustomObjects, so you cannot access it like $myFile.Path, you will actually have to loop through the $myFile first, so try changing your script to be the following and see if that helps any
    param
    [string]$path
    $myFiles = Import-Csv -Delimiter '~' -Path $path -Header Path, ShortName
    # Then you can call it like so
    $myFiles.Path #Returns just the path
    $myFiles.ShortName # Returns the shortname
    $path='C:\AreaSistemi1\'
    foreach ($myFile in $myFiles)
    get-childitem -path $myFile.Path *.spx | % {
    " Starting File Process....." >> $myFile.Pathsistem.log
    $PDate = get-date
    $date = get-date -uformat "_%d_%m_%Y_%H%M%S.bak"
    #"Set backup date to $date" >> $path\sistem.log
    $newname=($_.fullname -replace ".spx",$date)
    $file = [System.IO.Path]::GetFileNameWithoutExtension($_.fullname)
    "File backup name is $newname" >> $myFile.Pathsistem.log
    Rename-Item $_.fullname $newname
    "Renamed file to $newname" >> $myFile.Pathsistem.log
    $lines = get-content $newname
    foreach ($line in $lines)
    $line + " " + $myFile.ShortName | Out-File "$path\sistem.csv" -append
    Write-Host $_.fullname
    "Files Processed on $PDate are $newname " >> $path\sistem.log
    Also looking at your script, you said your text file contained the format of <filePath>~<shortname> but I see you doing a $myFile.Pathisstem.log, where does the Pathisstem.log come from?
    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
    Don't Retire Technet

  • How to read an Excel File AND SEND TO GENERATOR

    Hi 
    I want send the datas from Exel file to my device, I have one part in mu code which can read my data from exel but I don t know how can I send this data to ny divice?
    I  really nead your suggestion, please.
    I attached my code also my Exel file.
    Attachments:
    DG5071.xlsx ‏1841 KB
    Rigol Generator.vi ‏52 KB

    Hello vsa,
    I checked the specifications of this Function Arbitrary Waveform Generator and I found that it is GPIB complaint. Instruments with GPIB protocol can be controlled using GPIB commands, but each instrument could have different GPIB commands. Despite this, most providers have "standard" commands among its products.
    I checked some documentation and found a help file that describes the GPIB commands used by this device, so the options are:
    1. Wait for someone to develop an Instrument Driver for this instrument.
    2. Check if you find any other Function Arbitrary Waveform Generator of the same brand that uses the same commands and for which there is already an instrument driver.
    3. Create your own instrument driver.
    If you choose option 3 I share with you the following links that you may find useful:
    Developing LabVIEW Plug and Play Instrument Drivers:
    http://www.ni.com/white-paper/3271/en/
    Connecting Instruments via GPIB:
    http://www.ni.com/getting-started/set-up-hardware/instrument-control/gpib-connect
    GPIB Instrument Control Tutorial:
    http://www.ni.com/white-paper/2761/en/
    Using IVI Drivers in LabVIEW:
    http://www.ni.com/white-paper/4556/en/
    Instrument Control in LabVIEW Tutorial:
    http://www.ni.com/white-paper/3511/en/
    Best regards.
    David P.
    National Instruments
    Applications Engineer
    www.ni.com/soporte
    Attachments:
    DG5000 Programming Guide.zip ‏907 KB

Maybe you are looking for

  • Fillable forms applications/functions

    I'm doing research on the functions of the fillable forms. Would it be possible to obtain a features list of what fillable forms can do, and what they can be used for? I'm looking to see if they can be applied to any processes at my work place. Also,

  • BBP_SAPXML1_OUT_BADI in SRM 7.0 for MDM Catalog

    Hi All, I have a requirement to transfer additional data together with a contract, such as price scales, discounts, and discount scales If the contract has condition like scale      Discount 0-10        20% 20-30      30% from SRM to SRM MDM Catalog.

  • Please Fix: copy paste footnotes

    When Apple updated Pages to 5.0 it broke a feature that I and many others use. In using Logos 5.0, software that I use for school and work research, when I copied a section and pasted into the previous version of Pages (including the current version

  • OnSubmit and struts?

    <html:form action="/SearchCustomer" method="post" onSubmit="return disableForm(this);">when i click submit nothing happens. The HTML version works fine. <form action="http://www.google.com" Method="get" onSubmit="return disableForm(this);"> <SCRIPT L

  • Add field not showing in contacts edit screen

    Trying to add nick names to the contact list in IPhone 6, but the "add field" prompt is not showing. Tips?