How to get the filename when parsing a file with d3l

All
After some time have experience with interconnect, IStudio I need the following info. Is it possible to get the filename when parsing a flat file using a d3l? This is needed because we need to store the filename together with the data into the database.
Any examples or directions to some documents are welcome.
Regards
Olivier De Groef

has anyone some info on this

Similar Messages

  • How to set the filename when downloading a file?

    I'm working on mvc4. I have generated excel file dynamically using following simple code my hosting is on Azure
    I have created a Root path and then try to save that excel file.
    Problem is when my Action Result method response comes back it is giving default popup to open a file but file name is having a GUID instead my provided file name
    What id wrong any clue?
    Excel file generation code:
    Microsoft.Office.Interop.Excel.Application xlApp =
    new Microsoft.Office.Interop.Excel.Application();
    return tempPath;
    This method returns something like C:\AppData\Local\dftmp\Resources\11a2435c-998c-4fe8-aa55-8bb42455b4ca\directory\myexcelFILE.xls.
    The Download File popup does not give file name as myexcelFILE.xls it gives some GUID why so?
    Action
    Result method code
    public ActionResult DownloadExcel(){
    string path = ExcelGenerationCode(fileName);
    Stream s = new FileStream(path, FileMode.Open, FileAccess.Read);
    return new FileStreamResult(s, "application/vnd.ms-excel");
    Ashish Fugat (ashuthinksatgmail.com) SE

    http://forums.asp.net/
    The above forum has the MVC section.

  • How to get the filename from J2SE File adapter

    In our project scenario , we are using J2EE and J2SE engine both .J2EE for mapping  and J2SE for Deliveying the message .
    In one senario, routing will be based on the filename .
    J2SE Sender File adapter --- XI Adapter --- XI pipe line
    So the File reaching to XI pipelane via J2SE File adapter--> XI adapter.
    When we are using the dynamic configurator in the XI to get the filename
    we are not able to get the file name  becasue it is coming to XI via
    XI adapter.
    How to get the filename ????Hope I am clear about the problem.

    hi,
    try this
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //obtengo la Key del FileName
    DynamicConfigurationKey keyF = DynamicConfigurationKey.getName();
    http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/DynamicConfigurationKey.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516
    /people/mohammed.zabiulla/blog/2008/03/26/have-you-ever-tried-to-determine-mail-cc-dynamically
    Hope it helps
    Thanks
    Rodrigo
    Edited by: Rodrigo Pertierra on Apr 11, 2008 9:31 AM

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • How to get the tab when is it pressed?

    I have the following situation:
    I have an array of JTextField inside a scroollpane. The size of my array is nine or ten depends on some rules. But my window show just four JTextField. So I would like to know how to get the event when I press "tab", just to show the others JTextField while I'm pressing "tab". Because I need this event to scrooll down or scrooll up.
    I tried the keylistener, but when I press "tab" any method(keypressed, keyreleased, keytyped) is called.
    I also tried the focuslistener. If this event I could scrooll down or scrooll up, but I couldn't do both!!
    Can somebody help me??
    Thanks anyway!!
    Gin

    JTextField implements Scrollable interface, which provides information to the enclosing container such as JScrollPane.
    Hence when the tab event is fired, you can compute the Rectangle area that should be visible and then call the 'scrollRectToVisible()' method in JTextField. This will inform the JScrollPane to scroll to the rectangle that you mention.
    HTH

  • How to get the content in embed swf file in Swf Loader on run time

    How to get the content in embed swf file in Swf Loader on run time
    [Bindable]
    [Embed(source="assets/index.swf")]
       private var SWFSRC:Class;
    <mx:SWFLoader id="_swfloader" source="{SWFSRC}" />

    Hi Flex harUI,
    Throw the error.
    Access of undefined property content

  • To upload the ZIP file and get the filenames available in ZIP file in ABAP

    Hi Experts,
    For my requirement, file from legacy comes as ZIP file with number of files in that.
    Please provide one code sample to upload the ZIP file from local workstation and get the filenames available in ZIP file to check few filename validation checks for the available files in report program.
    Thanks in Advance,
    Regards,
    Basani

    1. Copy the ZIP file into App server
    2. Call function
      call function 'RFC_REMOTE_PIPE'
        destination 'SERVER_EXEC'
        exporting
          command = command  " Unzip command gunzip /path & file
          read = 'X'
        tables
          pipedata = std_lines
    then you can read the files and can validate the file names

  • How to get the absolute path of a file from the local disk given the file n

    how to get the absolute path of a file from the local disk given the file name

    // will look for the file at the current working directory
    // this is wherever you start the Java application (cound be C: and your
    // application is located in C:/myapp, but the working dir is C:/
    File file = new File("README.txt"); 
    if (file != null && file.exists())
        String absolutePath = file.getAbsolutePath();

  • In Mac how to get the Full name of a file Programmatically?

    Hi Friends,
             I am doing one Mac application for displaying the contents of a file. I can able to get some information about the file by using this code below...
      NSDictionary *dict=[fileManager attributesOfItemAtPath:myPath error:nil];
    Now I want to get the some other informations also like Full Name, copyRight, version... So Please suggest me how to get the full name of a file Programmaticallly?

    Your question doesn't make sense.
    First off, if you are going to get the attributes of a file, you need its full name before you can do anything. So that's part one taken care of.
    This function returns a dictionary full of typical file information (type, size, mod dates, etc.) as well as some HFS data (creator code, type code) which, I strongly suspect, are not "pulled out of the file" but rather generated on the spot. (See NSFileManager for the full list of attribute keys.)
    The other items you hoped of retrieving are not part of the regular file system. Sure, a Truetype font has a copyright string and a version, but what about an HTML file? A PNG? A text file you just created?
    There simply are no standard functions to retrieve copyright and version.

  • How to get the filename of the active jsp page?

    how can i get the filename of the active jsp page?

    You could register the JSP [ages in the web.xml and then use the ServletConfig.getServletName.
    You could use the JspContex.getServletName which will return the registered name or the name of the servlet class.
    You could programmatically add a page context attribute that holds the jsp page name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to get the Details when we checked with check box?

    Hi....
    I want to display all the records of perticular checked vendor_id's. n for this checking I want to display series of checkbox along with vendor_id's. could U please give me the code for this.

    actually I'm not getting the logic how to get the vendor_id's which are checked in checkbox...... infact I'm not familier with checkbox properties also.....
    i can able to display series of checkboxs along with vendor_ids . but when I clicked perticualar checkboxes which vendor_id's I wanted. how can display only these checked vendor_id's records. ???? Can U help me????

  • How to get the link when right-clicked (for extension development)?

    Hi,
    I want to get the link when I right-click it in a page.
    I explain: when you right-click a link, you get "Open link in a new window"; this menuitem sends the link to the js function to perform an action and that's exactly what I an looking for
    Thank you

    Hi,
    If you have than one table with add_row_button then this code will work fine
    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    tableBean is Handle for your advanced table, hope it will help.
    Regards,
    Reetesh Sharma

  • How to get the refund when cancelling your plan?

    Please, I want to know how to get the refund.
    I just cancelled my plan but they asked me to enter customer´s service.

    Hi Andresgarzas,
    Welcome to Adobe Forums
    Please see the link mentioned below for chat
    http://www.adobe.com/support/download-install/supportinfo/
    Select the product you have from the drop down menu. Please select ' Adobe Id and signing in ' from the next box and then click on  (Still Need help! contact us) and it will direct you to chat support.
    Thanks
    Garima

  • How to get the path of input type="file" tag

    -- im using <input type="file"> tag to get an input file from a local host, it returns only the filename but not the complete path of the filename,,,
    -- i need to know on how to get the compelete path /directory of the filename using <input type="file"> tag , or is there any other way to get an input file from a local host aside from <input type="file"> tag?
    thanks

    http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_file.asp?frame=true
    When a file is uploaded, the file name is also submitted. The path of the file is available only to the machine within the Local Machine security zone. The value property returns only the file name to machines outside the Local Machine security zone. See About URL Security Zones for more information on security zones.
    i need to know on how to get the compelete path /directory of the filename
    using <input type="file"> tag You can't. Its a security thing.
    is there any other way to get an input file from a local host aside from <input type="file"> tag?No. Not using just html.
    You could always go into activex components, but thats different again.
    Cheers,
    evnafets

  • How to get the encoding of a XML file ...

    Hi,
    How do you get the encoding of a XML file?
    For example,
    <?xml version="1.0" encoding="SJIS"?>
    I am trying to retrieve the above encoding="SJIS", but I can't seem to locate the API for doing so.
    Thanks in advance for any help,
    Eric

    Hi ddossot,
    Thanks for your suggestion.
    However, the xerces.jar file that comes with my old tomcat server is an old version and thus, the getEncoding method is not even present in the DocumentImpl class. The option to update to a newer version of tomcat and xerces is not available. What a pity... :-(
    Well, I just have to try to find a way around. Worst case scenario, parse the first line in the xml file myself.
    Regards,
    Eric

Maybe you are looking for

  • Media projector and Macbook Air

    I want to connect my Macbook Air (2010) to Infocus media projector. What do I need?

  • ALE in sd

    how sd tickets are linked with the ale or edi., idoc....and pls help me how to find the background jobs in sap sd. Thanks Bharat

  • Insert photo to  word doc

    how do you do this? I open a word doc , click insert photo and My photo library icon remains greyed out, i have looked up alll the help solutions and nothing works. Any ideas??? Message was edited by: PJ8

  • BGP selection criteria in a VXR-G2 running SB code

    Hi, In brief, I have a VRF configured on a PE router which is a 7200-G2 router running 12.2(31)SB18, I import two route targets, one of them belongs to another VRF. Now, when I receive two default routes from both VRFs, and my question is, why did th

  • Installing 9ifs (9.0.1) on 9ias(1.0.2.2.0) (is it possible)

    I am interested if it is possible to install 9ifs (9.0.1) on 9ias (1.0.2.2.0)? If it is how should i do this. Is there any documentation, because I couldn't find it. I would like to use 9ifs portlet on my portal. Any help would be very greatfull. I h