FTP Activity - mget multiple files with dynamic names

Hello All
Hope all is well.
I was wondering if there was a way to configure FTP activity to transfer multiple files with dynamic names from source location at daily intervals.
For example, my source files are affixed with date values (source_filename_<mmddyyyy>_<hh>.txt):
source_filename_12252009_00.txt
source_filename_12252009_06.txt
source_filename_12252009_12.txt
source_filename_12252009_18.txt
What I would like my process flow to do would be to download just these 4 files once daily based on a dynamic ftp script as follows:
open ${Remote.Host}
${Remote.User}
${Remote.Password}
cd ${Remote.RootPath}
prompt off
mget ????????
quit
In DOS batch script you would have the mget command with a wildcard as:
mget source_filename_%DATE:~0,2%%DATE:~2,2%%DATE:~4,4%*.txt
How does one go about implementing this in OWB? Does it require a user defined substitution varilable of some sort?
FYI, I am using version 10gR2.
Cheers.

Hi ,
If you are able to achieve your objective from a DOS batch script then you can call that script for an User Defined Activity in OWB process flow .
Hope this helps.
Thanks,
Sutirtha

Similar Messages

  • Recive a file with dynamic name

    Hi All,
    I want to receive a file with dynamic name containing date stamp to it.... eg File_20080123.txt , File_20080122.txt etc.
    Can anybody suggest how to do it?
    Thanks,
    Atul

    Atul,
    Are u using mapping program in ur interface? If yes you can go ahead with ASMA + Dynamic Configurations for renaming the file.
    Have u tried this option?
    See the below Solution
    Check the ASMA File for both sender/receiver channels.
    Write the below code UDF in mapping program
    //Get Input date. Don't pass anything to this UDF except the Date.
    //Map the output to the root node of the target.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String fname = conf.get(key);
    String ret = fname"_"Date
    return "";
    raj.
    Edited by: Raj on Jan 23, 2008 4:09 PM

  • Batch Rename Multiple files with different names

    Hi,
    Is there any way to batch rename multiple files with individual names? I.e
    IMG_123 changed to  RSP45AS
    IMG_124 changed to MOL157A
    IMG_125 changed to AGKH135
    IMG_126 changed to MNOLH13
    IMG_127 changed to ASFBLUG
    Etc.
    Are they any programs or scripts or plug ins that would do that job?
    Thanks

    HI there Onemorewave,
    It looks like there is a batch remname feature included in OS X 10.10 Yosimte if you are planing on updating. 
    Rename files, folders, and disks - Mac Help
    Rename multiple items
    Select the items, then Control-click one of them.
    In the shortcut menu, select Rename Items.
    In the pop-up menu below Rename Folder Items, choose to replace text in the names, add text to the names, or change the name format.
    Replace text: Enter the text you want to remove in the Find field, then enter the text you want to add in the “Replace with” field.
    Add text: Enter the text to you want to add in the field, then choose to add the text before or after the current name.
    Format: Choose a name format for the files, then choose to put the index, counter, or date before or after the name. Enter a name in the Custom Format field, then enter the number you want to start with.
    Click Rename.
    Note: To batch rename, you would want to choose the "Format" option.
    -Griff W

  • Multiple files with same name--- automatic renaming option??

    I am trying to sort my files by adding multiple files to a single folder. However, many have the same filename, and I get the error " there already exists a file with the name "x", please choose another name" etc. I am dealing with thousands of files here that are very tedious to rename individually. Is there an option or program that either disables this block on multiple files with the same name in a common folder, or automatically renames the files as they are placed in the folder?

    i would like all the files to have different names, but not have to do it myself. they are generated my my audio recorder, which automatically names files take1, take2, take3 etc. multiple sessions entail multiple folders, i am trying to consolidate.

  • How to check-in multiple files with same name having different revision num

    Hi
    Can anyone please tell me, how to check-in multiple files with the same name with different revision number using RIDC API.
    For eg:
    First I will check-in a file(TestFile.txt) into a content server with revision number 1 using RIDC API in ADF application. Then after some time, will modify the same file(TestFile.txt) and check-in again. I tried to check-in same file multiple times, however first time its checking-in correctly into server showing revision as 1, while checking-in same file again, its not giving any errror message, and also its not reflecting in server. Only one file(TestFile.txt) is reflecting in server.
    How to implement this functinality using RIDC API? Any suggestions would be helpful.
    Regards
    Raj
    Edited by: 887680 on Mar 6, 2013 10:48 AM

    Hi Srinath
    Thanks for your response. Its not cloning, its like check-in file first, then check-out the file and do some editing and then again upload the same file with different revision number using RIDC. I got the solution now.
    Regards
    Raj

  • IDOC to multiple file with dynamic file names with same content

    Hi,
    My scenario is from IDOC to file.
    The number of files which i need to create is dynamic, which depends on the number of plants.
    I have a Z-table where i will maintin list of all plants ( non SAP plant names).
    I need to fetch the data from this z-table and depending on the nunber of plants i need to create the file for each plant and fiel name should contain plant name in it. EX: abc_<plant>_datatype.txt
    I want to use only receiver one CC, and files should be created in the same directory.
    Can we do this without BPM?

    Hi,
    You can use the Mapping lookup concept to fetch the plant names from Z-tables and then you can use the variable substitution technique to resolve your purpose.
    Here you need to create multiple interfaces ie.e per plant to create multiple files. You can use common Communication channel for all.
    Mapping Lookup
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm
    Mapping Lookups - RFC API
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm
    Variable Substitution
    An interesting usage of Variable Substitution in XI
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    SP12 -Variable Substitution option
    Receiver File Adapter:Variable substitution :FATAL  ERROR
    Thanks
    Swarup

  • Creating Multiple Files with different name at Receiver side

    Gurus -
    Can anybd tell me how to generate multiple files at the Receiver side in the given target directory with different file names?
    One source message will contain number "N" using which we have to generate files "N" number of times at the Receiver side.
    Kindly help.

    hi,
    are you following this blog?
    provided you have SP>14 and no IDOC/HTTP involved.
    and have you got the error you mentioned when testing with sample payload?
    from where did you take the payload? if is from SXMB_MONI make sure you dont have <MESSAGE> tags in the payload,generally systems adds <MESSAGE> tags when you do multi mapping.
    get the payload from SXMB_MONI right click ->view source payload(this is raw data) and test it.
    it should be ok now.
    and refer my discussion in the thread ,as I got he same error.
    Split mapping created no messages -Mluti Mapping

  • Pick the file with dynamic name

    Dear All
    My scenario is file to idoc.
    legacy system generates file with a file name as current date.txt which keeps on changing
    eg:   on 9th july file name is 09072009.txt and
           on 10thjuly filename would be 10072009.txt
    How do i pick such file and process it?
    What should be the File Name in the sender communication channel?
    Please help me in resolving this issue
    Thanks
    Bhasker

    Hello Baskar Raj,
        Your requierement can be acheived by using the combination of UDF and ASMA(AdapterSpecifieMessageAttriburrtes) which helps us greatly in meeting dynamic filename rquirements.
    1.You have to enable either FIlename,Time stamp or all the he ASMA in the sender side communication channel .
    2.Write the UDF that gets the file name (CURRENT DATE.txt)during runtime that is available from enabling ASMA in sender communication channel .
    3.change it to the name u want to modify (Replace with the new file name by getting time stamp from the ASMA attributes.
    4. Map the UDF output to any of the target nodes(can be messagetype node MT_ur msg type name).
    5.Enable ASMA on the target side also in that chek same file name.
    Code to be writen in UDF is mentioned by sunilchandra in the below thread u jus need to avoid filename in that and use only date format it will acheive ur requrement.
    Re: Regarding Target File name
    Thanks,
    Ram.

  • Tag File with dynamic name

    I need to include a page with a name I do not know in advance. I can do this with <jsp:include page="${filename}"/>.
    Can I also do it somehow using tag files?

    Atul,
    Are u using mapping program in ur interface? If yes you can go ahead with ASMA + Dynamic Configurations for renaming the file.
    Have u tried this option?
    See the below Solution
    Check the ASMA File for both sender/receiver channels.
    Write the below code UDF in mapping program
    //Get Input date. Don't pass anything to this UDF except the Date.
    //Map the output to the root node of the target.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String fname = conf.get(key);
    String ret = fname"_"Date
    return "";
    raj.
    Edited by: Raj on Jan 23, 2008 4:09 PM

  • SSIS 2008 - Sending file with dynamic name using FTP task

    Hi  - Thanks for taking a look -  (I'm very new to SSIS.)
    I'm trying to create an SSIS 2008 package that does the following:
    1) Execute a stored procedure on SQL.
    2) Download the results as a CSV file to a 'local' location.  The file name is set using a variable ("User::LocalFilePath") dynamically based on the current time:
    @[User::LocalFilePath] + "GreatReportName_" + "_" +(DT_STR,4,1252) DatePart("yyyy",getdate()) + Right("0" + (DT_STR,4,1252) DatePart("m",getdate()),2) + "_" + Right("0"
    + (DT_STR,4,1252) DatePart("d",getdate()),2) + "_" + Right("0" + (DT_STR,4,1252) DatePart("hh",getdate()),2) +  "_" + Right("0" + (DT_STR,4,1252) DatePart("mi",getdate()),2)
    + "_" +  Right("0" + (DT_STR,4,1252) DatePart("ss",getdate()),2) + ".csv"
    3) Transfer the CSV file to an FTP site.
    4) Delete the CSV file from the 'local' location.
    I've been able to do steps 1 and 2 so far.  However when trying the move the newly created file to the FTP site I get the error:
    "Error: 0xC002917C at Send to FTP, FTP Task: The variable "User::LocalFilePath" doesn't contain file path(s)."
    (When I set the "IsLocalPathVariable" to "False" and use a file previously created the file is correctly transferred to the FTP site.  This proves that the FTP details are correct and that the "RemotePathVariabe" is working
    correctly.)
    I have set the variable ("User::LocalFilePath") to "EvaluateAsExpression" in the variable properties.
    Can anyone help?
    Many Thanks,
    UnoT

    Hi Vaibhav,
    Thanks for your response.  I set the "DelayValidation" to "True".  However
    that didn't make any difference.
    I added in all the breakpoints, but it didn't give any results (I may be doing this incorrectly?):
    Any other suggestions?
    Thanks,
    UnoT

  • Source files with dynamic name

    Hi,
    Is there a way to load from a variable file name sources, for example file name with date postfix, something like this: INPUT_DEPT_20070313.txt ??
    Or i must create an external process in the process flow wich is to rename the file every time to a fix name then load ??
    Thanks.

    Correct. If you are using SQL*Loader mapping, then put a transformation before the mapping in your process flow. If you are using external tables (PL/SQL mapping), then put a premapping procedure in the mapping. And yes, use UTL_FILE package to rename the file.
    Greetings,
    Mate

  • How to specify Sql Loader input file with dynamic name

    The input file name likes pochange_YYYYMMDD.dat which is generated by other program each day.
    I want to load this file to a table.
    Any help? Thanks a lot

    I thought in an excellent strategy to do this:
    Conditions:
    - you have to have only one file in the folder with the data.
    - Independently of the name of that file. A process is always going to change its name to a fix name.
    - the controlfile must at another fixed path
    the scripts is this one:
    joel_sqlloader.bat
    ren *.dat always.txt
    sqlldr <user>/password data=always.txt control=<another_path>/my_ctl.ctl
    - In a folder you will have these files:
    * joel_sqlloader.bat
    * pochange_YYYYMMDD.dat
    - In another folder you will have:
    * my_ctl.ctl
    Did you get it ?
    Joel Pérez
    http://otn.oracle.com/experts

  • Static Files with same name. How does apex determine which files to serve?

    Hello, I'm using apex 4.2.1.00.08 and I cannot figure out how apex manages the static files and cannot find any help in the docs (other that some high level UI description).
    The application is serving some file and I cannot find which one it is in any easy way.
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen as
    SELECT *
    FROM wwv_flow_files
    WHERE flow_id = 0;
    and can apparently only be deleted using "SQL Commands" inside apex.
    the URL called is something like
    wwv_flow_file_mgr.get_file?p_security_group_id=13498126233076320&p_fname=myfile.css
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.
    apparently files linked to flow_id 0 have precedence over all the other files ...
    Thanks for clearing up a bit of "fog" on this issue.

    VC wrote:
    Go to that application > shared components > Static files you should see the file.the problem is that there are multiple files with that name, and that sometimes the file being served is linked to application "0" and it doesn't show in the "shared components" interface ...
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.Static files can be uploaded to apex with optionally associating with an application within that workspace.
    Files associated with an application are referenced using *#APP_IMAGES#*
    Files not associated with an application are referenced using *#WORKSPACE_IMAGES#*I referenced with #WORKSPACE_IMAGES#, but now I see that if I use #APP_IMAGES# the URL generated will also contain the application ID. This would help to discriminate between different files with the same name but linked to different applications ...
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen asWhy are you particularly interested in application 0?Because somehow APEX puts the files that I uploaded there ... they can be seen selecting from wwv_flow_files. Do they take precedence over all other files with the same name?
    Filename is unique for the given workspace[and application]I disagree. I have multiple files with the same name ... the root of this problem ...
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.How is your static file referenced??
    But not always, try associating an static file with and application and reference it using #APP_IMAGES# instead of #WORKSPACE_IMAGES#
    See
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_sub.htm#BEIDCGAJ
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/ui_file_manage.htm#HTMDB06011
    Thanks, but the documentation doesn't give much details ... apparently files referenced with #WORKSPACE_IMAGES# can still resolve to files linked to specific applications ... I would like to understand the actual workflow for the various cases (file references with APP_IMAGES, referenced with WORKSPACE_IMAGES, file associated with the application, with another application, with no application, with application "0" ...).
    Also, I find it somewhat misleading that you can have files associate with applications that don't exist anymore (e.g. have been deleted).
    Edited by: GChierico on Apr 11, 2013 2:16 PM

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

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

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

  • How to send multiple files with it's original name over HTTPS using one CC?

    I am working on a File to HTTPs scenario. It is in production and working fine. Currently we send only one file and I have hard coded the name in the communication channel in the header fields. Now we have to send more files with different names and I want to use only one receiver channel instead of many. We need to send the files with their original names.
    I used the ASMA in the sender File Adapter and I see the FileName in the dynamic configuration under http://sap.com/xi/XI/System/File name="FileName".
    I know we can use a UDF in message mapping and get the value and put it in HEADERFIELDONE. But we don't want to use mapping as the files are huge and we don't want to insert XML tags in the payload.
    So how do I put the Filename from the DynamicConfiguration to the HTTP header field as FileName without using mapping? Are there any settings?
    Can I put something in the PROLOG or can I use any other module in the File Sender Adapter or is there any other option?
    Any help is appreciated.
    Thanks
    Sai

    See my blog:
    /people/stefan.grube/blog/2009/06/19/unknown-use-case-of-dynamicconfigurationbean-store-file-name-to-jms-header-without-mapping
    You have to put the configuration in sender channel, as HTTP adapter does not allow modules.
    For the second module, put values related to HTTP adapter.

Maybe you are looking for

  • What is the use of Offline Database Object in SOA

    Hi All, Can anyone let me know the purpose of Offline Database Object in SOA. 1) When we will create the Offline Database Object in soa ? 2) How do we connect this object to any data base schema ? Note:- Please provide me the example on this Thanks,

  • Adding new field in purchase order

    Hi all, We are using SAP 4.6E; the requirement is to add a new field in stock transport order in ME21N.  For the line time, we have to mention supplying storage location also. So how to add this field in ME21N transaction.  I checked in screen layout

  • Launching a page in the parent window

    Hello all. I'm not necessarily new to flash, but i've never gotten into the meat of what the program can do and now have run out of my limited bit of knowledge. I have an animation of have created as a splash intro to the site. Ive gone through been

  • IDoc Status Messages

    Hi All, Is there any Function Module or standard report which will list out all the Status messages of an IDoc...Basically i need to capture all the segments which are in error state... In EDIDS table i am not able to link to a particular segment. Pl

  • Questions on TEDT form text positioning

    Dear Experts, 1 - I know how to set the text length of a table field but how to change their position? As I am working on another language version that is not English. I somehow found that there are 2 outcomes which different layouts, the first one i