Position of timestamp in the filename

Hello All,
I have an IDoc to multiple files scenario, for which I am using 1:n mapping, and the files are getting generated correctly.
My requirement is to create a dynamic filename which has the timestamp at a specific position in the filename.
i.e.
X_Y_ID_<b>TIMESTAMP</b>_ID1.txt
The default behaviour when generating dynamic filename using the standard functionality is it writes / appends the timestamp at the end.
Is it possible to:
1. Put the timestamp at the position as mentioned in above example?
2. Change the format of the timestamp as per specific format requirements?
Appreciate your replies.
Thanks in advance.
-- amol

Amol,
There are two options.
1) Add timestamp to a segment or the top level structure (but not field) which is not mapped.
2) If the above is not possible then I would suggest to add one segment in the last. Then use this for Var sub. Dont write this segment in the ouput. just ignore it. (this solution is not possible if you are writing xml file)
Please check this:
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
Regards,
---Satish

Similar Messages

  • Writing timestamp on the content of file (not the filename) using FTP Adapt

    Hi Experts,
    Is it possible to write a timestamp (from the source server) to a target logfile if I'll use FTP Adapter?
    Here the scenario:
    Source:
    source.log -> the contents is AAAA (the timestamp base from the server is [06/09/10 10:00])
    - basically the source.log file is overwritten with the same content but the timestamp is changed so that's would be scenario
    it will checked by the FTP adapter....
    Target:
    target.log -> the content of the file is 06/09/10 10:00
    so probably if i have a target logfile I'll just have to append the file as this
    06/09/10 10:00
    06/09/10 10:02
    06/09/10 10:04
    06/09/10 10:06
    06/09/10 10:08
    06/09/10 10:10
    If it's possible, how will I do this? Do I need script? or just normal settings of the FTP adapter?
    R-jay

    Yes, is posibble. if i not wrong, you can do this ussing Dynamic configuration.
    see those links
    /people/ryan.crosby/blog/2009/02/27/file-xi-proxy-scenario--moving-binary-files-with-accompanying-filename-attribute-in-converted-xstring-format
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
    Thanks
    RP

  • Using Javascript & Actions to resize an image and add the filename as text

    Hello,
    I am currently working on a way to take an image, resize it and add exactly what is in it's file name (before extension) as a text layer. I have succeded in this BUT am having issues with file names that require more than one line of text.
    I need the text to align to the bottom of the image & the script or action must then resize the image so that the text does not overlap.
    Any ideas on how this can be done?
    At the moment I am using:
    -"Fit Image.jsx" to resize my image to a specific size (This was included in the Photoshop CS5 scripts)
    - A script to add the file name without extension and place the file name at a specific position.
    AdFileName.jsx
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.PIXELS;
    try
      var docRef = activeDocument;
      // Now create a text layer at the front
      var myLayerRef = docRef.artLayers.add();
      myLayerRef.kind = LayerKind.TEXT;
      myLayerRef.name = "Filename";
      var myTextRef = myLayerRef.textItem;
      // strip the extension off
      var fileNameNoExtension = docRef.name;
      fileNameNoExtension = fileNameNoExtension.split( "." );
      if ( fileNameNoExtension.length > 1 ) {
       fileNameNoExtension.length--;
      fileNameNoExtension = fileNameNoExtension.join(".");
      myTextRef.contents = fileNameNoExtension;
      // off set the text to be in the middle
      myTextRef.position = new Array( docRef.width / 2, docRef.height / 2 );
      myTextRef.size = 12;
            myTextRef.font="Arial-BoldMT"
            //set position of text
            myTextRef.justification = Justification.CENTER;
            myTextRef.kind = TextType.PARAGRAPHTEXT;
            myTextRef.width= docRef.width;
            myTextRef.height= docRef.height/ 2;
            myTextRef.position= [0, docRef.height * 0.88];
    catch( e )
      // An error occurred. Restore ruler units, then propagate the error back
      // to the user
      preferences.rulerUnits = originalRulerUnits;
      throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );
    Can the position be changed to allow more rows of text but keep it aligned with the bottom of the layer?
    How can I script in a way to make the image resize based on the amount of text lines?
    Any help would be greatly appreciated.

    You can add a text layer any where the only thing you need to worry about is the size of the font you use.  You can normally calculate a font size by saving the images resoltuion and then setting its resolution to 72 DPI calculate a font size basied of the images pixel width and the number of characters you want in a line. After adding the text layer you can restore the image to its original resolution and align the text layer by making a selection and alignint the text layer to the selection.  There are nine posibilites like the positions in the selection you can align to like a tick tack toe board. You need to use a script to add the text layer because your retrieving the filename.  The positioning of the text layer could be done easily in an action the would use the scriot to add a text layer the do a select all  the align the added text layer to the selection.
    About your script don't make text paragraph just add new line characters to make a multi line text layer So it can be positioned easily
    I do just that with my stampexif action.  The action uses my stampexif Photoshop java script to add a multi line text layer containing some formatted EXIF data then the action centers the text layer and add a layer style to it. Link http://www.mouseprints.net/old/dpr/StampExif.jsx Example

  • Set the filename in a textframe with JS in Illustrator CS2 WIN

    Hello and good morning (and sorry for my bad english),
    I found some possibilities to set the filename in a textframe. But only in applescript or for CS (WS-dateandtime v0.8 from Wolfgang Reszel)
    b There is no JS-script, which works correctly in Illu CS2 Win.
    Please, help me to get a JS-script that proper works.
    Here is the code:
    //////////////////////////////////////////////////////////// english //
    // -=> WR-DateAndTime <=-
    // A Javascript for Adobe Illustrator
    // by Wolfgang Reszel ([email protected])
    // Version 0.8 from 30.8.2004 (also should work with Illustrator CS)
    // This script inserts the actual date or the actual time to a
    // predefined position in the document.
    // To define the position, you'll have to create an textobject and
    // execute this script while the object is selected. The whole object
    // has to be selected and not words or letters. You can mark more
    // objects, if you select each object separate and execute
    // the script on it.
    // With the placeholders {DATE} and {TIME} you are able to define a
    // particular point, where the date or the time should be replaced.
    // If there is no placeholder in the textobject
    // "{FILENAME} ({DATE}, {TIME})" will be used as standard placeholders.
    // To update the date and time execute this script without any object
    // selected.
    // There are some additional placeholders:
    // {FILE} - complete document-filename with path
    // {FILEPATH} - only the documents filepath
    // {FILENAME} - the filename of the document
    // On my system this script can't see the path of the document, when
    // it was opened directly from windows Explorer (double click).
    // In Illustrator CS it is now possible to edit a DateAndTime-Object.
    // To enable the english messages and date-format change the "de"
    // into "en" in line 90.
    // Sorry for my bad english. For any corrections send an email to:
    // [email protected]
    //////////////////////////////////////////////////////////// Deutsch //
    // -=> WR-DateAndTime <=-
    // Ein Javascript fuer Adobe Illustrator
    // von Wolfgang Reszel ([email protected])
    // Version 0.8 vom 30.8.2004 (sollte auch unter Illustrator CS laufen)
    // Dieses Skript fuegt das aktuelle Datum und die aktuelle Uhrzeit an
    // eine vorher bestimmte Stelle im Dokument ein.
    // Um eine Stelle zu bestimmen, muss man ein Textobjekt erzeugen, es
    // markieren und dann dieses Skript aufrufen. Es muss das gesamte Objekt
    // ausgewaehlt sein, nicht etwa Buchstaben oder Woerter. Es lassen sich
    // nacheinander auch mehrere Objekte als Datum/Uhrzeit markieren.
    // Mit den Platzhaltern {DATE} und {TIME} (in geschweiften Klammern)
    // kann man bestimmen, wo genau im Text das Datum und die Uhrzeit
    // erscheinen soll. Sind die Platzhalter nicht vorhanden, wird
    // automatisch "{FILENAME} ({DATE} - {TIME})" verwendet.
    // Zum Aktualisieren des Datums/Uhrzeit muss man dieses Skript aufrufen
    // wenn kein Objekt ausgewaehlt ist.
    // Es gibt noch einige zusaetzliche Platzhalter:
    // {FILE} - kompletter Dateiname mit Pfad
    // {FILEPATH} - nur der Verzeichnispfad des Dokuments
    // {FILENAME} - der Dateiname des Dokuments
    // Auf meinem System kann der Pfad nicht ermittelt werden, wenn das
    // Dokument vom Windows Explorer geoeffnet wird (Doppel-Klick).
    // InÿIllustrator CSÿkann man nun ein Datum/Uhrzeit-Objekt bearbeiten.
    // Um dieses Skript mit deutschen Meldungen und Datumsformat zu
    // versehen, muss in Zeile 90 das "en" durch ein "de" ersetzt werden.
    // Verbesserungsvorschlaege an: [email protected]
    //$.bp();
    var language="de"; // "de" fuer Deutsch
    var WR="WR-DateAndT

    Hello Steve Light,
    Thanks a lot for answering me. I did it (renamed and added this two lines at new line 89 and 90 in the Script, selected Textframe and execute the jsx from Windows-Explorer) but nothing happened. Only a warning message appeared. It sayed: "You used an illustrator-12 Script " The Message is in German, I cannot to translate literally.
    No filename and no date wasn't fill in textframe.
    It's a great pity, the same Script runs in CS3 without problems. But I need it for CS2 :-(
    What can I do?
    Sorry for my bad english again.

  • Change the filename of an uploaded file.

    I have created a web app so that users can login to a secure zone and upload a file to a specific folder in my business catalyst site.  I would like to append the user's credentials to the filename.  I can see how to capture the user's firstname and lastname but I am not sure how to make it part of the filename.
    The filename at the moment is named liked this 4628132_311455_New Text Document.txt with a timestamp and id auto appended to the original uploaded filename.  I would like to add some kind of user identifier to this name at form submission.

    Hi,
    I cannot see a workaround and doesn't appear possible as the system will only append the unique ID which cannot be customized at this stage. 
    Kind regards,
    -Sidney

  • IBOT - can we put the Repository Variable in the filename

    Hi,
    In an IBOT i use the Advanced - custom script option to export the extract to a server. instead of altering the javascript, i was hoping to add the timestamp to the filname by including a Repository dynamic variable in the 'Other Parameters' fields when contructing the name, is this possible
    e.g. can anything like this work... file_@{biServer.VARIABLES['sTodayDate']}.xls
    thanks
    Edited by: SQhell on Jan 16, 2013 11:15 AM

    I'm not sure about your approach but going with batch file or shell script is more easy. Look for the file created with system date then change the filename as needed.

  • Capture the filename with ODI

    Please find the query below. This has to be done exclusively in ODI only no shell scripts to get the file name.
    Input file name : abc_<timestamp>.txt.
    Now need to read the file and capture the filename.
    Read the file and move it to Archive or Error Directories based on the output
    How can we achieve this with in ODI?
    Please let me know your inputs as early as possible.
    Thanks in Advance.

    Yes, it's possible.
    For capturing filename you should use procedure using jython/beanshell
    if the file is a source then you can use interfaces
    Use the ---> for OK sucess and KO error
    Use ODIFileMove utility to move the file
    In order to do all these you should have understanding of using variables, models and interfaces.
    For my part i have done a procedure which can monitor a directory and capture filenames as soon as file arrives , then invoke scenarios passing the filenames through variables.

  • Changing the filenames using unix script

    Hi,
    I have a scenario where I have to change the file names on the Receiver CC using a unix script and add date and timestamp to the file name
    this is what I'll be writing to filename_01.xml I need to change that to newfilename_01_MMDDYYYY_HHMISS.xml
    the 01 in the file name is the counter, so I might having more than one file where 01,02, etc will represent the counter on the filename.
    Any help is really appreciated.
    Thanks,
    Joe.P

    you can try this
    create the field called filename in target
    use a costant and concat it with the out out of UDF( or some functon avaleiable counter) which will genereate numbers like 1,2,3,4,5,6 and send this filename_01 to the output field and use this in the variable substution to genreate the filename by the CC
    if you dnt want to send this fieldin output file then specify that fieldname in CC length as 0

  • How could I include a timestamp in a filename?

    I'm trying to include the current time and date in an output filename? How would I do that? Here's what I have so far:
    void setInfo(MouseEvent evt) {
    // set up the information about event for display
    mouse_x = evt.getX();
    mouse_y = evt.getY();
    try
    java.io.FileWriter fw = new java.io.FileWriter("mousecoordinates.csv", false);
    java.io.PrintWriter pw = new java.io.PrintWriter(fw, true);
    if (eventType != null)
    pw.println("(" + mouse_x + ", " + mouse_y + ")");
    pw.println();
    //pw.flush();
    pw.close();
    }catch (IOException e)
    System.out.println ("Error writing to file");
    modifierKeys = "";
    if (evt.isShiftDown())
    modifierKeys += "Shift ";
    if (evt.isControlDown())
    modifierKeys += "Control ";
    if (evt.isMetaDown())
    modifierKeys += "Meta ";
    if (evt.isAltDown())
    modifierKeys += "Alt";
    display.repaint();
    public void mousePressed(MouseEvent evt) {
    eventType = "mousePressed";
    setInfo(evt);
    public void mouseReleased(MouseEvent evt) {
    eventType = "mouseReleased";
    setInfo(evt);
    public void mouseClicked(MouseEvent evt) {
    eventType = "mouseClicked";
    setInfo(evt);
    public void mouseEntered(MouseEvent evt) {
    eventType = "mouseEntered";
    setInfo(evt);
    public void mouseExited(MouseEvent evt) {
    eventType = "mouseExited";
    setInfo(evt);
    public void mouseMoved(MouseEvent evt) {
    eventType = "mouseMoved";
    setInfo(evt);
    public void mouseDragged(MouseEvent evt) {
    eventType = "mouseDragged";
    setInfo(evt);
    }

    the program is running from an applet. I just need to save some data points to a file. And since I will be running this file numerous times, I want to distinguish each using the date and/or time in the filename.Here is my entire code:
    package mouselistener;
    * @author Nicole Powell
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    import java.io.BufferedWriter;
    import java.io.OutputStreamWriter;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.FileWriter;
    import java.io.PrintWriter;
    import java.io.DataOutputStream;
    import java.util.*;
    public class mouselistener extends JApplet
    implements MouseListener, MouseMotionListener {
    Display display; // Drawing surface, not sure if this is needed
    int mouse_x, mouse_y; // Position of mouse.
    String modifierKeys = ""; // If non-null, gives special keys that are held down.
    String eventType = null; // If non-null, gives the type of the most recent mouse event.
    public class Display extends JPanel {
    // Shows the surface where the mouse is moving
    public void paintComponent(Graphics g) {
    // Draw the panel, showing information about mouse events.
    super.paintComponent(g); // Fills panel with background color.
    g.setColor(Color.blue);
    g.drawRect(0 ,0, getSize().width - 1 ,getSize().height - 1);
    g.drawRect(1 ,1, getSize().width - 3 ,getSize().height - 3);
    g.setColor(Color.red);
    if (eventType == null) {
    // If eventType is null, no mouse event has yet occurred
    // on the panel, so don't display any information.
    return;
    g.drawString("Mouse event type: " + eventType, 6, 18);
    if (modifierKeys.length() > 0)
    g.drawString("Modifier keys: " + modifierKeys, 6, 34);
    g.setColor(Color.black);
    g.drawString("(" + mouse_x + "," + mouse_y + ")",
    mouse_x, mouse_y);
    } // end of paintComponent()
    } // end nested class Display
    public void init() {
    // Set background color and arrange for the applet to listen for mouse events.
    display = new Display();
    setContentPane(display);
    display.setBackground(Color.white);
    display.addMouseListener(this);
    display.addMouseMotionListener(this);
    void setInfo(MouseEvent evt) {
    // set up the information about event for display
    mouse_x = evt.getX();
    mouse_y = evt.getY();
    Date date = new Date();
    try
    java.io.FileWriter fw = new java.io.FileWriter("coordinates" + date + ".csv", false);
    java.io.PrintWriter pw = new java.io.PrintWriter(fw, true);
    if (eventType != null)
    pw.println("(" + mouse_x + ", " + mouse_y + ")");
    pw.println();
    //pw.flush();
    pw.close();
    }catch (IOException e)
    System.out.println ("Error writing to file");
    modifierKeys = "";
    if (evt.isShiftDown())
    modifierKeys += "Shift ";
    if (evt.isControlDown())
    modifierKeys += "Control ";
    if (evt.isMetaDown())
    modifierKeys += "Meta ";
    if (evt.isAltDown())
    modifierKeys += "Alt";
    display.repaint();
    public void mousePressed(MouseEvent evt) {
    eventType = "mousePressed";
    setInfo(evt);
    public void mouseReleased(MouseEvent evt) {
    eventType = "mouseReleased";
    setInfo(evt);
    public void mouseClicked(MouseEvent evt) {
    eventType = "mouseClicked";
    setInfo(evt);
    public void mouseEntered(MouseEvent evt) {
    eventType = "mouseEntered";
    setInfo(evt);
    public void mouseExited(MouseEvent evt) {
    eventType = "mouseExited";
    setInfo(evt);
    public void mouseMoved(MouseEvent evt) {
    eventType = "mouseMoved";
    setInfo(evt);
    public void mouseDragged(MouseEvent evt) {
    eventType = "mouseDragged";
    setInfo(evt);
    }

  • Prefix timestamp before the name of the file

    Hi Experts,
    Can we prefix timestamp before the name of the file?
    Generally file name followed by timestapm instead of that
    can we add timestamp before file name? .If so please let me know .
    thanks in advance
    N.P.Babu

    Hi,
    all you need to do it to create the filename
    in one of the tag in your xml message and
    then use variable substitution:
    refere to Variable Substitution section on this page
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    it's easy but using
    Adapter-Specific Message Attributes
    with sp14 is much better
    Regards,
    michal

  • Can I creat timestamp with the help of 6601 in labview?

    I need a timestamp less than 1ms. So far as I know, 6601 can measure the time interval at the accurecy of us. Can this help to creat timestamp?

    Jimmyjimmy2000,
    The simple answer is probably, yes. I think you can timestamp using the 6601.
    I know this is my usual "answer" - to ask more questions, but more information is needed to propose a good solution.
    Do you need absolute time or relative time accuracy?
    By absolute I mean, do you need a tracable timestamp with clearly definable accuracy to GMT or the NIST clock?
    Or is is good enough to measure intervals of time accurately?
    For instance,
    Absolute:
    1st datum logged at January 2, 2003 0847.105 hours EST
    2nd datum logged at January 2, 2003 0847.107 hours EST
    Relative:
    1st datum logged at January 2, 2003 0847.105 hours EST
    2nd datum logged after an additional 0.002 seconds
    Both structures are possible
    and useful for different purposes. In the first case the best evidence is needed to fix the time of the event under examination. In the second case the begining of the acquisiton is fixed as absolutely as possible, but subsequent data are acceptable as timed by the clock of the 6601 card.
    I noticed example code at ni.com that allows a clock update using the global positioning system by wireless means. This is for PXI-6608.
    There are VI that ship with LabVIEW for GPS timestamping (find examples search for: NI-TIO). The measure buffered pulse VI measures the time between 2 digital edges and builds an array of those intervals as they occur.
    Also, what will trigger the timstamping event? A digital pulse? Do you need to trigger at a particular voltage level?
    Triggering at a set voltage level could be tricky. It might be important which data acquisition card you are using.
    For further info search at ni.com:
    http://search.ni.com/?col=alldocs&layout=TechResources&ql=a
    A
    lso, if you can, call NI at (800)433-3488 in the US. Documentation is limited for counter/timer applications. But, the engineers at NI can help you figure out how to get going on the phone.
    Mike

  • FDTA Customizing of the filename

    Hi.
    We are using transaction code FDTA to download files to a server. The files are genereted with classic RFF* programs in TC F110. We find two problems with the downloading:
    The lenght of the proposed filename on RFF* variants is only 38 where we would need around 100 (field RFPDO2-FORDNAMD )
    We would also like to put a timestamp, and the total amount of the file in the filename, in order to do this we would like to know if there is any available BTE / BADI we could use.
    I would really appreciate any help you can provide, specially on point number 2, as with a BTE we could surely solve point 1.
    Thanks for your help.
    Ignacio.

    We have solved it creating a ZFDTA

  • [b]HOW TO:[/b]  Copy and Paste THE Filename AND its PATH from Finder

    HOW TO DO THIS: Copy and Paste THE selected Filename AND its entire PATH from Finder to another application as in document footer reference, or document database which has a path field to aid in locating the file later.
    Finder, Spotlight and File Info (can be used to display Path) or using Command F, command I, etc. but user is not allowed to copy the path to clipboard.
    This is rudimentary, yet the word Path, is unknown to Mac Help.
    Message was edited by: jbov

    AJ,
    Isn't it amazing....There is no Command Key for this action? Apple Care was confounded too. And thanx, it'll be a help....
    Jim
    its tedious, but this should work:
    open a terminal window.
    Drag and drop the icon for the file in the terminal
    window.
    This will put the full path including the filename on
    the command line.
    Copy the path from the command line, and paste
    (wherever).
    Close the terminal window.

  • How do I add the filename as an overlay on a PDF file compiled from images?

    I am creating pdf files from digital camera images and want to add the filename as a visible overlay (ie either in Header/Footer or as a watermark).  I can find all other alternatives eg Bates numbering, customised Header/Footer etc), but cannot find a solution to adding each image's filename to the image.  I can do it in Bridge but not Acrobat.

    Acrobat does not preserve the original filename information of images.
    You should it in another application (Photoshop?) and then import the final
    image into Acrobat.

  • Is there a way to automatically insert the filename in the footer of a spreadsheet using iWork's numbers 3.2?

    Is there a way to automatically insert the filename of a spreadsheet into the footer when using iworks numbers 3.2?  iworks 09 had this feature and I can't find this feature in the new version of numbers.

    Hi rhyolite,
    In Numbers 3.x, The Print View and Layout View have gone (for now at least). Page Headers and Footers can only be reached under Menu > File > Print... to open Print Preview. Hover the cursor to reveal the Page Header and Footer fields.
    The only inserts that I can get to work in Print Preview are Page Number, Page Count and Date & Time. Filename is no longer in the Insert menu.
    Regards,
    Ian.

Maybe you are looking for

  • How can you make it so that when a person from a company calls me it shows their name and company on the screen

    I use my iPhone for work as well as personal. However for work, I have noticed that when someone rings me, for instance Bob Mansfield from Com tec, the phone screen states just 'Bob' and no other details. I have the best part of 6 Bob's in my contact

  • Labview graph

    Hello guys, Someone can explain the better way do plot a graph like the bottom one? The ploblem is the vertical "lines". Can Someone give me an idea? Thanks

  • ATP check in Service orders

    Can somebody explain what to expect on the screen (from the user perspective) when doing either an ATP check from a service order or running what SAP calls Availability information? There is an icon to trigger availability check. What happens then? D

  • IPod Touch 5 Capabilities

    Is the iPod Touch 5 capable of movie and tv show watching, and podcasts and audio books? Does it have an FM Tuner like the iPod Nano?

  • Keychain errors during setup

    I was setting up Snow Leopard (a clean install) on a mac mini today. I set my name, shortname, and password and continued on. Towards the end of installation I imported the users and groups from my 10.5 server and continued to setup services. Eventua