Read contineously file from folder

HI
I have 1000 of files and I want read files from folder automatic. Each file ends with
if $BATCH_FILE==true
define $END,false
else
power off
define $END,true
if 1 text file is finish then it should load another file automatically

Hi kalu,
don't know what you're trying to do:
- you have a "path" control but you don't use it for ListFolder...
- you get an array of filenames from ListFolder, but you don't use that data later on...
- you are using "OpenFile"/CloseFile to get a file path (in the event) and later on you use that path to read data from...
Your original question doesn't has anything in common with those things you do now...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Read a file from folder

    i need to get a file from application server folder with date validation.
    how do i get the file from foder with fname, size and date.

    Hi,
    Please try this.
        DATA: FILETAB TYPE TABLE OF FILE_INFO,
              FILEREC TYPE FILE_INFO,
              COUNT TYPE i,
              FZISE TYPE i.
        CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
          EXPORTING
            DIRECTORY                   = '<Yourfilename>'
            FILTER                      = ''
            FILES_ONLY                  = 'X'
          CHANGING
            FILE_TABLE                  = FILETAB
            COUNT                       = COUNT
          EXCEPTIONS
            CNTL_ERROR                  = 1
            DIRECTORY_LIST_FILES_FAILED = 2
            WRONG_PARAMETER             = 3
            ERROR_NO_GUI                = 4
            others                      = 5.
        IF SY-SUBRC <> 0.
          RAISE CNTL_ERROR.
        ENDIF.
        IF COUNT = 0.
    *     Does not exist
          RESULT = ABAP_FALSE.
          FSIZE  = 0.
        ELSE.
    *     Does exist
          RESULT = ABAP_TRUE.
          READ FILETAB INDEX 1 INTO FILEREC.
          FSIZE = FILEREC-FILELENGTH.
        ENDIF.
    Regards,
    Ferry Lianto

  • Reading all files froma  folder

    Hi ,
    Does anyone know how to read the data from all text files in a given folder?
    I mean does text_io recongnises a certain sintax to do this?
    Thanks,
    Sandu

    Well
    I'm having problems initializing a java.lang.String as ora_java.jobject.
    I was able to import in forms my class ,(wich works ok when tested like standalone java class,it returns all the filenames from a folder),a package was generated on the form for it.
    But,I've got to pass it the folder name as a String.
    I've imported java.lang.String as ora_java.jobject,and a package was generated on the form.
    When I try to call string.new('c:\work');
    it won't compile,it says invalid reference to variable String.
    What should I do?Is there any predefined Type in ora_java package for java.lang.String?
    Thanks,
    Sandu

  • Reading files from folder in java

    Hi ..I am new to java ..can you help me ..how to read the files from folder(containing 10 java files) and store in a array..
    Thanks

    use the java.io package, more specifically java.io.File. You can construct a new File by passing in a String version of the pathname, and then store that into your array.

  • How to read the file from a folder.

    Hi All,
    How to read the file from a folder or directory from the non sap server / remote server.
    Regards
    Sathis

    open dataset filename for input in text mode
                         encoding default.
    filename is character type variable with the destination filename.
    Edited by: Jino Augustine on Apr 19, 2010 1:31 PM

  • How to read .mdb file from shared folder

    Hi All,
    In one of my local computer I have a shared folder and within the folder I have a .mdb file. Now I am trying to read that file from MII. I have tried with Get_File_List action block. I am providing the following information to Get_File_List
    Folder :
    <Computer Name>\<Shared Folder Name>
    Mask: .mdb
    But in return of Get_File_List, I am not getting any file related information. It is only providing like below
    <Rowsets>
    <Rowset>
    <Columns>
    <Column Description="Name" MaxRange="0" MinRange="0" Name="Name" SQLDataType="1" SourceColumn="Name"/>
    <Column Description="Date" MaxRange="0" MinRange="0" Name="Date" SQLDataType="93" SourceColumn="Date"/>
    <Column Description="Size" MaxRange="100" MinRange="0" Name="Size" SQLDataType="4" SourceColumn="Size"/>
    <Column Description="LastWriteDate" MaxRange="0" MinRange="0" Name="LastWriteDate" SQLDataType="93" SourceColumn="LastWriteDate"/>
    <Column Description="ReadOnly" MaxRange="1" MinRange="0" Name="ReadOnly" SQLDataType="4" SourceColumn="ReadOnly"/>
    <Column Description="FullPath" MaxRange="0" MinRange="0" Name="FullPath" SQLDataType="1" SourceColumn="FullPath"/>
    </Columns>
    </Rowset>
    </Rowsets>
    Can anybody suggest me how to achieve it.
    Thanks in advance
    Chandan

    Hi Chandan,
    Specify the mask as *.mdb and try.
    Thanks,
    Dipankar

  • I want to make a schedular which read xml files from a folder ,import in Indesign template then export as a pdf....

    i want to make a schedular probably in Coldfusion or using javascript ,  which read xml files from a folder ,import in Indesign template then export as a pdf....

    I don't think you understand: I want to open Dreamweaver and build a brand new site, then when I am done I want to host the dreamweaver site on the Business Catalyst platform. I dont want to use anything in BC to build the site, I just want to use the hosting platform. I do not want to import a BC site into dreamweaver or anything like that. I just want to use BC the same way I would use godaddy, or uhost or any other hosting provider. Based on your response you said that "of course its possible to build a BC site in Dreamweaver" I dont want to build a BC site, I want to build a Dreamweaver site and host it on the BC platform. Like I said before it doesnt seem like this is possible. As of now we can only build a new site in MUSE and integrate it into BC without using a BC template. Can you understand what I am saying. I DONT WANT TO USE A BC TEMPLATE, I WANT NOTHING TO DO WITH BC WHILE I AM BUILDING THE SITE WITH DREAMWEAVER, JUST LIKE MUSE DOES.

  • Hi,delete file from folder?

    hi,i am deleting file from folder as follwos
    <%@ page import="java.io.File" %>
    <%
    File myFile = new File("D:\\jakarta-tomcat-4.1.18\\webapps\\ROOT\\upload_files\\xyz.txt");
    myFile.delete();
    %>
    i am sucessfuly deleted file from above path.
    if i use follwing code i unable to delete my file, can one help,
    how to do it,
    <%@ page import="java.io.File" %>
    <%
    String fname="xyz.txt";
    File myFile = new File("D:\\jakarta-tomcat-4.1.18\\webapps\\ROOT\\upload_files\\'"+fname+"'");
    myFile.delete();
    %>
    thanks
    pullareddy

    i think if above doesn't work try this it should work
    change this line
    File myFile = new File("D:\\jakarta-tomcat-4.1.18\\webapps\\ROOT\\upload_files\\'"+fname+"'");
    to this
    File myFile = new File("D:\\jakarta-tomcat-4.1.18\\webapps\\ROOT\\upload_files\\"+fname);

  • Print PDF file from folder using SSIS

    Is there a way in SSIS to print pdf file from folder?
    ANy help much appreciated.

    One method is calling Adobe Acrobat Reader exe from Execute Process Task within SSIS passing the document path as the argument
    The command and arguments will look like this
    http://geekswithblogs.net/JeremyRamos/archive/2013/10/22/print-ssrs-report--pdf-from-sql-server-agent-or.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Help required in reading a file from Shared location on Network

    Hi,
    I need help in reading a file from a shared location. Can you kindly tell me the pattern for inputting the shared location path. I am using fileUtilService>Exists
    "\\Shiva\test\shared\eForms\temp.xlsx" is the actual location of the file. How should i input the location in the INPUT variable of EXISTS.

    readResource content operation will fetch documents from Adobe Repository. Unless you checkin the required file into repository, the above error will remain.
    From a shared folder, you should able to read the files using readDocument (using FileUtils) without any issues. Perhaps, the access rights prevent the execution.
    If you are running JBoss as a windows service (turnkey will create a windows service for the JBoss instance), try the following:
    Run -> services.msc -> Right click on JBoss service for Adobe LiveCycle -> Properties
    Check the value given under logon tab. The User Account mentioned there should have appropriate access to the shared folder you are attempting read.
    Nith

  • HI,,,How to read text file from my emulators root

    hi friends,
    Actully i m having problem with file connection i.e. i cant read text file from my root of the emulator.....
    i have tried like this...
    plz help me out
    String uri = "file:///C:/WTK22/appdb/DefaultColorPhone/filesystem/root1/New Folder/main.txt";
    InputConnection conn = (InputConnection)Connector.open( uri,Connector.READ );
    InputStream in = conn.openInputStream();
    conn.close();
         for(int j=0;j<12;j++)
         ch=in.read();
         str.append((char)ch);
    par1=str.toString();
    in.close();
         screen4.append(par1);
         display.setCurrent(screen4);

    still its not working.........
    String uri = "file:///C:/WTK22/appdb/DefaultColorPhone/filesystem/root1/readme.txt";
                        FileConnection conn = (FileConnection)Connector.open( uri,Connector.READ);
                        InputStream in = conn.openInputStream();
                        conn.close();
                   String ss="";
                   String str1="";     
                   int ch=0;
                   byte b[]=new byte[753];     
                             ch=in.read(b,0,753);
                             str1= new String(b,0,ch);
                                  ss=str1.substring(493,501);                     
                        screen4.append(ss);
                        display.setCurrent(screen4);
                        }catch(IOException io){}

  • Delete file from folder only (not from list)

    Hi all,
    I've searched a lot and didn't succeed so far, that's why I need your help. In a cloud context, I'm actually creating and uploading files (pdf and/or xml files) "on the go" to sharepoint folders via the SOAP API and this is perfectly working. But
    in a cloud context, I also need to decomission services which is translated into deleting files into Sharepoint.
    That's where it became complicated, because according to the API we cannot delete files if they are not part of a list structure, which is not my case. Is that true ?
    The only info I have when trying to delete a file via the SOAP Api is : its name, its folder, and the endpoint where the folder is. So my question remains simple I guess : is this possible ? If so, how to (a link to the SOAP body would be usefull)
    Thanks a lot
    Regards
    Baptiste

    Hi,
    According to your post, my understanding is that you want to delete file from folder.
    In SharePoint 2010, It is recommended to use Client Object Model to achieve it, the following code snippet for your reference:
    string siteURL = "http://siteurl";
    ClientContext context = new ClientContext(siteURL);
    //specific user
    NetworkCredential credentials = new NetworkCredential("username", "password", "domain");
    context.Credentials = credentials;
    Web web = context.Web;
    context.Load(web);
    context.ExecuteQuery();
    string relativeUrl =web.ServerRelativeUrl +"/DocumentLibraryName/FolderName/FileName";
    File file = web.GetFileByServerRelativeUrl(relativeUrl);
    context.Load(file);
    file.DeleteObject();
    context.ExecuteQuery();
    If you still want to use SOAP API, we can use the UpdateListItems method under Lists web service to achieve it.
    http://www.dhirendrayadav.com/2010/06/delete-list-items-using-web-service.html
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/61466984-1844-48a1-8c1e-1c59a0f9876a/move-and-delete-files-remotely-using-sharepoint-web-services-?forum=sharepointdevelopmentlegacy
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • How to delete a READ ONLY file from Directory

    Hi Friends,
    how to delete a READ ONLY file from Directory , file is in my system only.
    Please help me .
    note: its read only file.
    Thank you.
    Karthik.

    hI,
    try with this statement.
    delete dataset <datasetname>.
    this will definitely work.
    Regards,
    Nagaraj

  • How to read the file from ftp server

    Hi
    I need to read a file from a ftp server . Iam using apache lib common-net .jar .
    FTPClient ftp = new FTPClient();
    ftp.connect(server);
    ftp.login(username,password);
    FTPFile[] files = ftp.listFiles();
    for(int i=0 ;i<files.length;i++){
    System.out.println(" File : "+ i + " - " + files);     
    InputStream ip = ftp.retrieveFileStream(path);
    I got the inputstream from the ftp server. but iam not able to read the contents of the file ....
    help me plzzzzz

    Hi
    I have one more problem . first i try to read the file and write the file in local directory . then i try to read the data in the remote file .. iam getting the datas as null.
    InputStream ip = ftp.retrieveFileStream(path);                    
    File f = new File("D:\\ftp.txt");                    
    FileOutputStream fo = new FileOutputStream(f);
    byte[] buf = new byte[1024];
    while ((len = ip.read(buf)) > 0) {                         
    fo.write(buf,0,len);               
    fo.close();
    BufferedReader br = new BufferedReader(new InputStreamReader(ip));
    String line;
    do {
    line = br.readLine();
    System.out.println(" data " +line);
    }while (line != null);

  • How to read .xls file from FTP server t oInternal table

    Hi
    am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
    but the data i get in LT_TEXT is special characters.
    CALL FUNCTION 'FTP_SERVER_TO_R3'
    EXPORTING
    handle = hdl
    fname = f_name "ProdDataFromCRM.xls.
    * CHARACTER_MODE = 'X'
    * IMPORTING
    * BLOB_LENGTH =
    TABLES
    BLOB = lt_text
    * TEXT = lt_text
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4
    can any one help me out to get the exact data..
    Really appreciate your quick response..
    Thank You

    Hi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
    CALL METHOD document->open_document_from_table
    of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
    Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
    But, who knows, perhaps you want "And Now For Something Completely Different".
    Regards
    Clemens

Maybe you are looking for

  • Might Be OT - Need Help With DW Design

    I am in the midst of transferring Access reports to Oracle. A lot of these reports display percentage data. What is a best practice for storing percentage data in a data warehouse? Should I add on the percentage calculations at the fact table level?

  • Background image for a Scene in JavaFX2.0

    Hi all, I am new to JavaFX2.0 and need to know how to set a background image for a scene. Thanks in advance.

  • Making my header background image scaleable using fluid grid layout

    I'm sorry I dont really know how to post a link to this site (its not online just on my laptop) But really all I have is a blank screen I just started trying to build this responsive site (the site I was building wasn't responsive so i had to start o

  • Please send me the easiest code...thanks :)

    Please send it to [email protected] thanks guy! Question 1 (10 marks) Write a program that asks a user to type A, B, C, or Q. When the user types Q, the program ends. When the user types A, B, or C, the program displays the message �Good job!� and

  • How do I continue to download my movie ?

    I was downloading a movie onto my ipod touch from itunes on my ipod and my ipod went dead and so I let it charge and it came back and then i try to resume my download process and it says: download error .....HELP!