Date and Time in Sender File Adapter Target Directory

Hi there,
is there a way of using Date and Time from XI to the Target Directory naming? To use variable substitution some fields of the message had to contain that date and time information, which is not our case.
For filename you can use "add time stamp" option, but and for target directory?
Thanks and regards,
Henrique.

> <i>Do you have further information on how to perform
> this with shell commands?</i>
> >> You need to write a shell script. This script will
> add the date/time stamp into the folder in the target
> system. This shell script is executed from the File
> adapter. So once the file is written into the target
> directory, then it will rename the directory.
Hi there, Moorthy
We've tried to write that shell script that you mentioned, but now we have a few doubts on how to make it create the proper directory.
In the file adapter, my target directory is "/%var1%/%var2%/", where %var1% and %var2% are variable substitutions, referencing data which comes from the payload. Now, I need the shell script to append "/<Year>/<Month>/" in the target directory. But where to archive the script? If it stays in the root directory, than how to make it create "/<Year>/<Month>/" folders inside a directory which is variable (/%var1%/%var2%/)?
Is there a way of passing %var1% and %var2% as parameters for the shell script?
Thanks a lot,
Henrique.

Similar Messages

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • How to get last modified date and time of a file which is in apache server.

    Hi ,
    I need to get last modified date and time of a file in remote machine.
    This file is in remote machine which has apache server installed.
    I am trying to get this information by connecting to apache server from client by giving absolute URI of the file to file object.
    URI is got from apache server URL by using toURI method.
    when I use lastModified method , its throwing exception , because scheme of URI is not file.
    I can't give scheme as file because ftp server is not installed on that server
    Is there any other way to get this information .

    No, unless you can use an FTP client.

  • Help adding current Date and Time stamp to file name

    I need help with my script adding current Date and Time stamp to file name.
    This is my file name = myfile.htm
    I would like to save it as = myfile.htm 8/29/2007 11:41 AM
    This is my script:
    <script>
    function doSaveAs(){
         if (document.execCommand){
              document.execCommand('SaveAs','1','myfile.htm')
         else {
              alert("Save-feature available only in Internet Exlorer 5.x.")
    </script>
    <form>
    <input type="button" value="Click here to Save this page for your record" onClick="doSaveAs()"
    </form>
    Thank you

    I agree, I guess I overlooked that!
    I would like to save it as = myfile 8/29/2007 11:41 AM .htm
    I need help with my script adding current Date and Time stamp to file name.
    This is my file name = myfile.htm
    I would like to save it as = myfile 8/29/2007 11:41 AM .htm
    This is my script:
    <script>
    function doSaveAs(){
    if (document.execCommand){
    document.execCommand('SaveAs','1','myfile.htm')
    else {
    alert("Save-feature available only in Internet Exlorer 5.x.")
    </script>
    <form>
    <input type="button" value="Click here to Save this page for your record" onClick="doSaveAs()"
    </form>

  • Socket connection time Out - Sender File adapter (Intermittent Issue )

    Dear FrIends,
    In our sender file adapter i am getting the following issue:
    I have already places timout : 120 secs.
    This isssue is occuring intermittently.
    Error occurred while connecting to the FTP server "100.142.131.30:21": java.net.ConnectException: Socket connection timed out: 100.142.131.30:21

    Hi Renu,
    You need to increase the timeout Seconds and check.
    Run the report RSFTP002.
    and check whether the connection to FTP works. Provide the below parameters:
    user = <your ftp user>
    pwd = <your ftp pwd>
    host= <your ftp host/ip>
    command1 = <ls>
    RFC Dest = SAPFTP
    Compress = N
    If the issue still exists, then check  with your BASIS Team.
    http://www.sap2048.com/socket-and-connection-issues-in-java-web-services-1351.htm
    Thanks,

  • Changing Date and Time with dng files

    My camera settings for date and time were wrong.
    So some of my files in Lightroom 3 have the wrong dates.
    This morning I downloaded Photoinfo 2.0.1 but it doesn't seem to want to accept "dng" files to change the info.
    It will accept "jpeg" files no problem.
    Can anyone help me with this.
    Thanks

    Open the Catalog Setting panel (Lightroom menu on Mac and Edit menu on Windows). Configure the Metadata>Exif tab as shown in red on screenshot. Select your images and choose Save Metadata to File (Ctrl/Cmd+S) from Metadata menu (same menu as Edit Capture time. This will save the date/time changes back into the file rather than just the catalog.

  • Error in sender file adapter: source directory does not exist

    Hi,
    The PI system is 7.11
    I've created sender file adapter with following details:
    Transport Protocol : File System
    Source directory: /interfaces/In
    I checked in AL11 that this path really exists and it does. (I can even see the .txt file that should be processed.)
    But still i get in Communication Channel Monitoring the following error:
    "Configured Source directory "/interfaces/In" does not exist.
    (i also tried to give the source directory as "interfaces/In" and as "//interfaces/In" but still the same error.
    Any suggestions as to what is wrong?
    kr
    Robert

    Actually, Need to use forward slash (/) to separate directory names in accordance with the Java specification.
    But wanted to try if that works..
    Also check directory name , path again as this is case sensitive...
    --Divyesh

  • Date and Time Sync at boot for Active Directory/Open Directory Authenticati

    All the macs in my school district are set to automatically sync their time with a network time server. They do not do this unless the system preference is opened. This poses a problem as all our users must authenticate against an Active Directory and an Open Directory server. If the time is out of sync they can not login, and therefore can not fix the time. I must then login in with a local admin account set the time and then the network account can login. I have tried using direct IP addresses for the NTP server. That doesn't work either. I have adjusted the tolerance of the AD server to accept a large discrepancy in time (did not work). Set the users to be mobile accounst (local home folders), did not work. The only fix will be to ensure that the time does sync at boot, before login. Is there a way to force the computer to sync at boot to a given NTP server, prior to the login window appearing?

    I have come up with my own solution for this issue. It is a two part solution. We found that the computers are experiencing time drift and that after they get out of sync by 5 minutes they can no longer login. One would think that the setting in the Date and Time system preference to automatically synchronize the time would take care of this. That however is not the case that check mark does not affect the ntp service at all. It merely eliminates the need to click a button when entering the system preference. How did we discover this? well that is part of the solution. We used webmin (http://www.webmin.com) to look at the ntp configuration. No matter what changes we made with the Date & Time preferences nothing changed in the system ntp settings. So on to the solution: Install webmin, and configure the ntp protocol manually to sync at your desired interval (I did hourly). This stops time drift. Next create a startup item and associated plist to force time sync at boot (be sure to loop it as different machines initialize their network cards slower). I have made ours available for download (http://www.manheimcentral.org/~getzt/netTime.zip). I hope this helps others. We have found that this works fairly well.

  • Date and time of photo files in PSE 10

    I imported about 1000 photo files (JPG) into my catalogon my desktop PC from files that I had saved on my laptop PC while on vacation.  Most of the files were imported with no problems, but some of them were saved with the wrong time and date information.  My folders are named for the date the pictures were taken, e.g., 2012-03-12.  A few of the files were in a folder inside a folder for a different day, "c:\users\Don\My Pictures\2012-03-12\2012-03-08".  What causes this?  How can I get PSE10 to work porperly?
    I have Windows 7, 64-bit PSE10, and an HP-PC with 8GB RAM.

    Thanks for the reply Brett N. 
    I read some previous posts on date problems, and one answer said that if the import was done outside PSE10, all bets are off as to the correct results.  That made me remember that I copied the folders and files to my desktop PC using Windows Explorer and then PSE10 found them as new files.   I assume that my problems were because of not using PSE10 to import the files.
    I am going to mark your reply as the correct answer, and give up on this issue until the next time I import files.

  • File Adapter: Target directory does not exist

    Hi All,
    Using RFC to File Scenario.
    While processing in File adapter, i get following error for the target directory.
    Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Target directory '
    *********************\Out' does not exist and cannot be created.
    Although I am able to use the same target directory on my local machine.

    I think FTP user didnt have suffiecinet otherrization to create directory in FTP, check once again Directory format entered is correct.
    if you have phycial access to FTP then create one folder and enter the same in File channel and push one message and let us know the result.
    Regards,
    Raj

  • Changing File Adapter target directory - container bounce required?

    I edited USPSshipment.wsdl in the FulfillmentESB project to reflect my desired target directory (/home/oracle/usps_ship instead of C:\temp) and then re-registered the project with ESB.
    The registration completed normally, and I verified that the edited USPSshipment.wsdl file exists in the deploy and content directories in the ESB home. Also, checking the WSDL file from the ESB console showed the new value.
    However, until I bounced the OC4J_soa container, order submissions continued to use the C:\Temp target. After I bounced the container, the next order submission went to the desired /home/oracle/usps_ship.
    What is the expected cacheing behavior here? Is there a programmatic way to clear the cache after an ESB deploy. It is too restrictive if I have to bounce the whole container serving ESB and BPEL (perhaps many processes and ESB adapters) just to make a change in one particular project.
    Thanks.

    Using the SOA Demo, FulfillementESB project ~
    Example: Immediate reflection of change w/o further action
    If I change the Shipment router filter criteria (Fulfillment_Shipment.esbsvc) to cut at say $750 instead of $500, then re-register FulfillmentESB with OrderBookingIS, JDeveloper reports:
    Registration of Services Successful
    Fulfillment Shipment Updates
    The next submitted order follows the new criteria (e.g. a $600 order goes out USPS).
    Example: Change not reflected in runtime, until OC4J container restarted
    If I change the target physical directory of the USPS Shipment file adapter (USPSShipment.wsdl), then re-register FulfillmentESB with OrderBookingIS, JDeveloper reports:
    Registration of Services Successful
    However, the next submitted orders continue to be written to the previous target physical directory. Checking the value of the re-deployed USPSShipment.wsdl at the ESB host filesystem and through the ESB console shows the updated value, but the old copy is being actually used to process the message.
    Restarting the OC4J container, causes the updated USPSShipment.wsdl to be referenced for messages submitted thereafter.
    -Todd
    Message was edited by:
    tbeets

  • Date and time in spool file name

    Hi,
    can anyone show me how i can write the code below so that the spool file will automatically take the system time and date?
    thanks again.
    set term off;
    set echo off;
    set heading off;
    set linesize 1500;
    set pagesize 9999;
    set feedback off;
    spool /home/oracle/ATM_Upload/files/CRD000119MMDDYYHHMISS.DAT;
    SELECT rec_ind||source_type||bbdsa_code||seq_num||dt_ti_ext||ver_num
    as atm_header
    FROM atm_dc_hd;
    spool off;

    Hi,
    I do something similar to this in a file called ed.sql which I use in SQL*Plus to give me a history of SQL*Plus buffers in separate files which follow the naming convention $DATABASE_$SID_$TIMESTAMP.sql. I use it from SQL*Plus when editing, rather than typing "ed" I type "@ed" and it does the naming for me:
    -- Turn off terminal output
    set termout off
    -- Save current buffer to a temp file
    save tmp.txt replace
    -- Set editfile name to $DATABASE_$SID_$TIMESTAMP.sql
    column fname new_value fname
    column sid new_value sid
    select trim(sid) sid
    from v$mystat
    where rownum = 1;
    select global_name||'_&sid'||'_'||to_char(sysdate, 'YYYYMMDDHH24MISS')||'.sql' fname
    from global_name;
    set editfile '&fname'
    -- Retrieve our initial buffer
    get tmp.txt
    -- Turn terminal output back on
    set termout on
    -- Fire up the editor
    edYou could probably adapt this in the following way for your needs:
    column fname new_value fname
    select 'CRD000119'||to_char(sysdate, 'MMDDYYHH24MISS')||'.dat' fname
    from dual;
    spool '&fname'I don't know how you get the 'CRD' part of the filename but you may be able to generate that too using the above as a guide.
    cheers,
    Anthony

  • Automatically set date and time in PDF file

    Good Day to all
    I use LiveCycle to create a PDF template so my users can fill up reports with out printing, the problem is the "time/date" field changes every time the supervisor open the file, so there is no way to track the date the report was created.
    I'm looking for a way (any trick) to make the automatically set but only when I save the document instead when I open it, I hope I'm explaining myself.
    Or maybe I just need to use another software, if you can recomend me one, or a trial just to be sure is the one I need.
    Any help would be great!!!...
    Thanks!!!

    You probably might have placed the code to populate the Data/ time value on the initialize event. Before you assign the current system date, check if the field has a value already. If it has then do not assign a new value.
    Thanks
    Srini

  • NFS Sender File Adapter Source Directory

    Hello everybody,
    I have the next problem cause company politics I can't put some files that I need in the XI Server, so I sould take them from another server directory, and cause compañy politics too I can't use FTP so I need to use NFS, but I've been reading some threads about it and some of them says I can't do it and some of them says that I can do it and even give come paths, now the file system is in a Unix Server, how can I do this????? should I put the server an path direclty in de cc or should I map the directory and how do I do this, any help would be appreciated, thanks in advance.
    Regards,
    Julio

    Hello Julio,
    If your lacation is as follows:
    server01\path1\path2
    Then put *
    server01\path1\path2* as your source directory.
    Important
    For Linux ensure that the <sid>adm user can access the specific location.
    For Windows ensure that the sapservice<sid> user can access the specific location.  (Will probably have to be on the domain to achieve this).
    Regards,
    Yaghya

  • How to capture file modification date and time over the web

    HI!
    I am creating a web based application and I am using webutil package for al lot of my work being that I ma working with renamin,deleting and uploading files for a users machine to the database. There is one functionality thing that I have to do in this application that webutil does not take care of and that is capturing the modification date and time from a file on the users machine. Please help me capture the date and time of a file on the users machine.
    Thanks!

    Since webutil allows you to write file on client PC directory, then you first create a directive file, then host that directive file. the directive file content is just the command lines when you manually do it on PC.
    Refer the ideas--just the ideas not the same built-ins in this URL:
    Hyperlink in forms

Maybe you are looking for