FTP multiple files (unknown file names) using utl_tcp

Hi,
I would like to
1. connect to a server
2. Change directory
3. ftp all the files available
I'm only capable of ftp known files, i.e. if I know the file names.
Is there any way of doing an mget or similar? I undertand that prior to that I would need to list the contents of the directorory into a variable but don't know how to do it actually.
Many thanks

Couldn't you just extend one the packages suggested? If you do it for the open source project they might make it part of the code base. Surely that would be easier than doing it from scratch?

Similar Messages

  • How to find the File name using the FTP Adapter

    hi all,
    how to find the File name using the FTP Adapter with BPEL.
    Regards

    Found the solution for this.
    First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
    In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
    Thanks for the posts

  • How can i search for multiple file names (images) in bridge?

    Hello everyone!
    Does anyone know how to search for multiple file names in bridge?
    That is to copy & paste something like this: _MG_2152, _MG_2177, _MG_2194, _MG_2195, _MG_2202, _MG_2212, _MG_2219, _MG_2261, _MG_2362, _MG_2401
    Not using several criterias in the search box that is. That takes too long.
    Thanks
    Steffen Rikenberg Photographer
    Oslo, Norway.
    www.steffenrikenberg.no

    Try this add-on [https://addons.mozilla.org/it/firefox/addon/find-all/ Find All]

  • Selection of Folder/File name using the same Fun.Module

    Please let me know if there is a function module which can fetch folder name/File name  from the directory path when f4 option of selection screen field is selected. Currently I am able to get the file name using FM F4_DXFILENAME_4_DYNP but the requirment is like I have to select either folder name or the file name depending on user selection.
    Note: Please let me know if there is a single Function module which can get folder name or the file name based on the user selection.i.e, if the user want to select a folder he can select or he can select files in the folder for processing

    Hi sridhar
    try this:
    PARAMETER : TXT_FILE(100).
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR TXT_FILE.
    PERFORM GETFILE.
    start-of-selection.
    PERFORM GETDATA.
    FORM GETDATA.
      DATA : FILENAME TYPE STRING.
      FILENAME = TXT_FILE.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = FILENAME
         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                      = IT_UPLOAD
      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.
    ENDFORM.
    FORM GETFILE.
      CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
        DEF_FILENAME           = ' '
         DEF_PATH               = '.'
        MASK                   = ' '
        MODE                   = ' '
        TITLE                  = ' '
       IMPORTING
         FILENAME               = TXT_FILE
        RC                     =
      EXCEPTIONS
        INV_WINSYS             = 1
        NO_BATCH               = 2
        SELECTION_CANCEL       = 3
        SELECTION_ERROR        = 4
        OTHERS                 = 5
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.
    <b>This is a part of my BDC program its working for me u try n reply if it works for u.</b>
    regards
    vijay

  • How to rename the SharePoint Document Library existing file name using Web service

    Hi,
    How to rename the SharePoint Document Library existing file name using SharePoint Web service.
    Is it possible. How could i do it?
    Thanks & Regards
    Poomani Sankaran

    Hi,
    Lists.UpdateListItems Method
    would be helpful for your requirement.
    Here is a blog with code demo for your reference:
    http://blogs.msdn.com/b/knowledgecast/archive/2009/05/20/moss-using-the-list-web-service-to-rename-a-file.aspx
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How to get file name using File adapter Sync read

    Hi All,
    I am using SOA 10.1.3.3 and JDEV 10.1.3.3.
    I have an async bpel process.
    I have to read file name in this process... so i have used file adapter sync read operation.
    How can we get the file name with out payload using sync read.
    For normal read (Inbound Spec)we have UseHeaders="true" property.
    Is there any property for sync read to read the file name.
    Please help me
    Regards
    PavanKumar.M
    Edited by: [email protected] on Oct 27, 2009 11:23 PM

    Hi Eric,
    The info in the link provided by you is for a normal read.
    I need to read he file name using Sync read operation.
    Regards
    PavanKumar.M

  • Change multiple files name at once

    Hi
    I would like to know if someone knows how to change multiple files name in mac. I need to name hundreds of files name, and dont want to do it one by one ... Example: Change from: Doc 1, Doc 2, Doc3 ...to: 2010Summer1; 2010Summer2,etc...
    Thanks in advance for any help,
    Joao

    Make an Automator workflow that changes the name. You would Replace text of "Doc" with "2010Summer". When you open Automator, choose Workflow. Drag in a Get Selected Finder Items and then drag in a Rename Finder Items. Select the "Replace Text" option. Fill in the Details, select the files in the Finder, and then run the workflow.
    There are also some third-party file renamers. Check MacUpdate or VersionTracker. I don't know if there are any free ones.

  • Hoe to logical file name using "FILE" transcation

    I want to create a logical file name using  "FILE" transaction , i have file path '/xfer/OUT/IDD0230 ' that cureently hard coded in program but i want to avoid hard code .

    You need to go to FILE transction, create new entry.
    You need to specify Physical name i.e value hardcoded in your program
    and corresponding new Logical Path which enduser will be entering.
    In code u ned to decode Logical path to physical path as its actual path.
    Award points if helpful.
    Shital

  • Append file name using FileSelectPopup under Windows 7

    Hi,
    I saw the following thread for the same issue in Vista, just wanted to make sure that this issue has been fixed for Windows 7 also before I upgrade to the latest version.
    http://forums.ni.com/t5/LabWindows-CVI/Append-file-name-using-FileSelectPopup-under-Windows-VISTA/m-...
    Thanks,
    Karthik
    Solved!
    Go to Solution.

    Hi,
    I ran across that issue when I was running applications built under CVI 7.1.1 on Windows 7.  I can verify that rebuilding the application under CVI 2009 SP1 and later CVI 2010 fixed the issue.  So you should be ok.

  • Same file name using JMS adapter on sender side.

    Hi Friends,
    I got a requirement to capture file name using JMS adapter on the sender side.
    Can some one help me in resolving this issue.
    Regards,
    Jeevan.

    Hi ,
    You can use Dynamic Configuration in mapping.
    Create a UDF with input as file name and copy/paste this code
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //conf.removeAll();
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    //String filename= conf.get(key);
    conf.put(key, fileName);
    key= null;
    return fileName;
    Thanks.

  • Cannot sync multiple file names

    my ipod crashed, i restored and now it says i cannot sync because of multiple file names???

    Any help?  If I unistall and reinstall iTunes, which ever account / phone I sync to first works, but the other account / phone will not work.
    Is there anyone else out there who is successfully syncing 2 phones on 2 accounts on one computer?  Why isn't this working anymore - it worked fine for over a year until now?

  • Get/put dynamic file name using FTP

    Hi Friends,
      I am currently using FTP_Connect, FTP_command and FTP_disconnect to get/put a file from a remote server.
    But the file name was changed to add a date/time stamp.
    So the filename became dynamic (example from 'test.txt' to 'test_200512160800.txt').
    I tried using get test. but my FTP command failed. Do you know anyway of doing this?
    Thanks.

    Hi Lego,
    here's another sample for the fm:
    REPORT ztest_epsf.
    PARAMETERS: date LIKE sy-datum,
                dir  TYPE epsf-epsdirnam,
                pattern TYPE epsf-epsfilnam,
                zid   LIKE vers_dest-rfcdest.
    DATA dir_list LIKE epsfili OCCURS 0 WITH HEADER LINE.
    DATA cnt_file TYPE epsf-epsfilsiz.
    DATA err_file TYPE epsf-epsfilsiz.
    START-OF-SELECTION.
      IF date IS INITIAL.
        date = sy-datum.
      ENDIF.
    *build pattern with input-pattern and date
      CONCATENATE pattern date '*' INTO pattern.
    *search for files in foreign system
      CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
           DESTINATION                   zid
           EXPORTING
                dir_name               = dir
                file_mask              = pattern
           IMPORTING
                file_counter           = cnt_file
                error_counter          = err_file
           TABLES
                dir_list               = dir_list
           EXCEPTIONS
                invalid_eps_subdir     = 1
                sapgparam_failed       = 2
                build_directory_failed = 3
                no_authorization       = 4
                read_directory_failed  = 5
                too_many_read_errors   = 6
                empty_directory_list   = 7
                OTHERS                 = 8.
      WRITE: / pattern.
      ULINE.
      LOOP AT dir_list.
        WRITE: / dir_list-name.
      ENDLOOP.
      ULINE.
      WRITE: / cnt_file.
      WRITE: / err_file.
    pls reward points for useful hints.
    thanks and
    regards Andreas

  • BPEL Process with multiple file types using one FTP adapter is not working

    i created a bpel process which will fetch the files from remote location using FTP adapter.
    Now the process works for only one format or file type like *.xls.
    How can i use more than one file format in one FTP adapter.
    OR
    is there any other way to do it.
    file type assignation is 5th step in FTP adapter configuration.
    i have tried *.xls,*.csv and *.xls;*.csv and *.xls:*.csv by seperating with comman, colon, space... still not working.
    i read the documentation *.* will not work.. for one file format it's working fine.
    looking forward for reply as soon as possible.

    Are you positive that it is not working? I'm not sure how you can use one FTP adapter for multiple file types unless the underlying data is exactly the same format or you are processing it as opaque data. Sometimes when a FTP adapter chokes on a file with a bad structure it doesn't create a BPEL instance, it simply moves the bad file to a separate folder.
    So I assume you are using opaque as the data type instead of using an XSD element?
    That said, I don't think you can put two separate file types in the filter. Is it possible for you to do something like: CommonFileName*.* or do you have similar files with other extensions?
    I know the above probably isn't of much help, but I had so many problems with the FTP adapter and its lack of features that I am writing my own. Unfortunately that is a large undertaking and there isn't any good documentation of JCA resource adapter / BPEL PM integration.

  • Sequence number/counter in File name using FTP

    Hi
    I have to add sequence number in the file name. How can i do that? everytime file generates it should pick up the latest file number.
    Example File1 File2 File3. 1,2 and 3 are the sequnce number.
    Regards

    Hi ria,
             You can do this by dynamic file creation. Use this following code and cretate an UDF. The map the required file format to the target header structure as below;
    UDF
    sequence number:
    IDENTIFIER is the parameter
    Import com.bp.xi.util.*;
    Code:
    return ServiceUtil.getSequenceValue( IDENTIFIER, container, false );
    Dynamic file:
    Key & Value is the parameter
    Code:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get( StreamTransformationConstants.DYNAMIC_CONFIGURATION );
    DynamicConfigurationKey confkey = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File",  Key );
    conf.put( confkey, Value );
    return "";     
    Input parameter "Key" is given a constant value"FileName"
    Second parameter "Value" is the file pattern
    Mapping
    Constant(File)concat function sequence numberUDF ==> Dynami File udf ==>target header record.
    In the receiver communication channel check the adapter specific function, filename
    points if useful
    regards,
    Murugavel

  • How to make Title same as File name using Batch?

    I will be having hundreds of PDFs each month that will need info in the Tile field in Document properties. We create our PDFs from Quark using Distiller. I have found an option in the Batch process in Acrobat for editing the Document properties. Is there something I can enter in the title field that would instruct it to pull the file name as the title? I compare this to using &File in Word when instructing it to include the file name in the header area. Anyone know of any way to do this? I have seen multiple posts to the Acrobat forum regarding similar issues, but none with any responses as to how to accomplish this. Any help would be greatly appreciated. Thanks!

    For this behaviour you're looking at a javascript ...
    For dumb population then use Batch Processing inside Acrobat ..
    Jon

Maybe you are looking for