How to get the file name?

Hoe to print the file name of the program we are running???

Hoe to print the file name of the program we are
running???This is a great opportunity to explain what you want to achieve rather than what you're trying to do. When you say "file" do you want the class file, the jar file or the original source file? Why are trying to do that?
Bear in mind that the compiled application may (and probably will) be distributed without the source code.

Similar Messages

  • How to get the file name in one of the Xml node field?

    Hi Experts,
    i have one requirement with file name in xml file.
    i need to get <b>the file name of file</b> in one of the node in xml content of that file.
    how can i achieve that req?
    treat this as Very Urgent.

    Hi Bheem,
    Explain your scenario in detail..
    >>i need to get the file name of file in one of the node in xml content of that file.
    1. Create an node <b>Filename</b> in the target datatype.
    2. Check the Option Filename in the Adapter Specific Message Attributes in the sender file CC.
    3. Use the following UDF and map it to the Filename field in the target message type.
    public String getFileName(Container container)
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Regards
    San

  • How to get the file name from Oracle B2B 10g

    Hi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
    In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
    Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
    I tried using the b2b.filename property in the receive activity and it is not getting the file name.
    <sequence name="main">
        <receive name="Receive_Note" partnerLink="GetB2BNote"
                 portType="ns1:Dequeue_ptt" operation="Dequeue"
                 variable="Receive_Note_Dequeue_InputVariable"
                 createInstance="yes">
                 <bpelx:property name="b2b.fileName" variable="WriteFileName"/>
        </receive>
      </sequence>
    Can you help me to get the file name from Oracle b2b 10g ?
    Thanks,
    b2b user

    Hi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
    In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
    Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
    I tried using the b2b.filename property in the receive activity and it is not getting the file name.
    <sequence name="main">
        <receive name="Receive_Note" partnerLink="GetB2BNote"
                 portType="ns1:Dequeue_ptt" operation="Dequeue"
                 variable="Receive_Note_Dequeue_InputVariable"
                 createInstance="yes">
                 <bpelx:property name="b2b.fileName" variable="WriteFileName"/>
        </receive>
      </sequence>
    Can you help me to get the file name from Oracle b2b 10g ?
    Thanks,
    b2b user

  • How to get the file name from directory

    Hi,
    I have a directory called test inside i have only one .txt file. i dont know that file name.
    Is it possible get the file name using PL/SQl code. ???
    Using that .txt file i have to create a dynamic table.
    If i have use *.txt also not working
    Anyone suggest me its possible to do or not????
    Cheers,
    Shan

    Hi Saubhik ,
    Wheni execute the function i am getting the following error
    Warning: compiled but with compilation errors
    Errors for FUNCTION LISTDIR
    LINE/COL                                                                       
    ERROR                                                                          
    7/3                                                                            
    PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SEARCHFILES' must be declared       
    7/3                                                                            
    PL/SQL: Statement ignored                                                      
    8/54                                                                           
    PL/SQL: ORA-00942: table or view does not exist                                
    8/20                                                                           
    PL/SQL: SQL Statement ignored                                                  
    10/11                                                                          
    PLS-00364: loop index variable 'EACH_FILE' use is invalid                      
    10/2                                                                           
    PL/SQL: Statement ignored      Cheers,
    Shan

  • How to get the File name that File Adapter is giong to write to a directory

    Hi,
    I am really stuck at one pint while working with File Adapter/FTP Adapter.
    My requirement is I need to read a message from the Queue and write it to a directory as a physical file using a File/FTP adapter and the name that adapter will give to the file at runtime need to find and inset into the database for audit.
    Is any body could help me to know the file name at run time that generated by the adapter?
    Thanks,
    --Khaleel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    I got the answer, I am posint this reply here that someone get the answer for this.
    I have tested like this...
    Create an empty BPEL process
    Create two File Adapters (one for Read, one fro Write) operations.
    Create a variable of type OutboundHeader_msg ( this message is chosen from the fileAdapterOutboundHeader.wsdl).
    Create a receive active and link it to the read operation then create a variable. Make sure this is the first activity so you check the create instance checkbox.
    Create invoke activity and link it to write adapter link.
    Place the assign activity in between the receive and invoke.
    In the assign activity create a copy operation and give your own name to the file name element inside the variable you created above.
    Now double click on invoke activity go to the adapter tab and choose the above variable as the Input Header Variable.
    This will generate the your own named file in the output file directory.
    Thanks,
    Khaleel

  • How to get the file name from downloads folder with the applescript??

    Hi All..
    I am downloading an application to downloads folder, I need to install the same application after downloading programatically.
    So how do I get the filename in runtime while downloading or after downloading from downloads folder with Applescript or Java?
    Also my download URL link doesnot contain full name of the download file.
    Pls suggest.

    Hi,
    The best method is to use curl.
    Other methods are not reliable, but can work, it depends on several factors (what the script does, what the user does).
    Here is an example with the curl command:
    set tUrl to "http://sourceforge.net/projects/vlc/files/2.0.4/macosx/vlc-2.0.4.dmg/download?ac cel_key=60%3A1350656196%3Ahttp%253A//www.videolan.org/vlc/download-macosx.html%3 A7233e4e9%245818d66f39b0576e1e9c4a0f3b46b1991180bfdd&click_id=976a88ee-19f7-11e2 -9a21-0200ac1d1d8e&source=accel"
    set dFolder to path to downloads folder
    tell application "Finder" to set newFolder to (make new folder at dFolder) as string
    set f to quoted form of POSIX path of newFolder
    do shell script "cd " & f & " && curl -L " & tUrl & " -o 'vlc.dmg'" -- download  to file "vlc.dmg"
    set downloadedFile to newFolder & "vlc.dmg" --<-- HFS path
    --do something with the downloadedFile

  • How to get the file name dialog on the selection screen

    Hi All
    I have a selection screen in which there is a parameter where I need to enter file name. Instead of typing filename in the parameter I would like to give a path from presentation server ( I am downloading Data to presentation server ).
    How to achive this functionality in case of a parameter on the selection screen. I need to have File open Dialog box like Windows here and then it should show the filename and it's path in this parameter after selectiong from the dialog box.
    Amol

    Hi..,
    Use the function module <b>F4_FILENAME</b> or <b>WS_FILENAME_GET</b> in the event
    <b>AT SELECTION-SCREEN ON VALUE REQUEST FOR P_FILE.</b>
    Parameters p_file type rlgrap-filename.
                AT SELECTION-SCREEN ON VALUE REQUEST EVENT            
    at selection-screen on value-request for p_file.
      perform value_request.
    *&      Form  value_request
          This subroutine proposes the possible input values             *
    There are no interface parameters to be passed to this subroutine.  *
    form value_request.
      call function 'WS_FILENAME_GET'
       importing
         filename               = p_file
       exceptions
         inv_winsys             = 1
         no_batch               = 2
         selection_cancel       = 3
         selection_error        = 4
         others                 = 5.
      check sy-subrc eq 0.
    endform.              
    Reward all helpful answers !!
    sai ramesh

  • How to get the file name being loaded

    Hi.
    Iam trying to load a file in ODI.
    Iam using ODIFileMove to process it
    OdiFileMove "-FILE=#FILE_PATH/ABCD*.csv" "-TOFILE=#FILE_PATH/ABCD.csv" "-OVERWRITE=YES" "-CASESENS=NO" "-RECURSE=YES"
    NOW my input file has the timestamp appended to it
    ABCD_08082012.csv i want to extract this timestamp value "08082012" and use it in my mapping further.
    please help by letting me know how i can extract this value in store it a global variable for further use.
    Thanks

    you can use SUBSTR(SUBSTR('ABCD_08082012.csv',-12),1,8)
    Thanks.

  • Get the File Name received from FTP Adapter

    Hi,
    How to get the File name reived through the FTP Adpater. I have created a variable with the Message type from ftpAdapterinboundheader.wsdl. from there I mapped the filename attribute to a local string variable.
    But I did not receive the file name. The output in the Audit trail is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Invoke_File_Process_FileProcess_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/PIERS/SP_FILE_PROCESS_UPDATE/">
    <AS_DIR xmlns="">I</AS_DIR>
    <AS_FILE_NAME xmlns="" />
    </InputParameters>
    </part>
    </Invoke_File_Process_FileProcess_InputVariable>
    Can any one let me know how to get the recevied file name from FTP adapter.
    Thanks

    you have to define variable of type InboundHeader_msg. Then in receive activity click on Adapter tab and for header variable chose your newly created variable (InboundHeader_msg). Once you receive message from FTP you should see in this variable fileName.

  • Get the file name using XSLT mapping

    Hi
    How to get the file Name at receiver side using XSLT mapping.
    Could any one please help me
    Regards
    sowmya

    Sowmya
    If you will use Grpahical Mesage Mapping then this can be achieved using Adapter-Specific Attribute u201CFileNameu201D
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Code Snippet -->
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
    u201Chttp://sap.com/xi/XI/System/Fileu201D,
    u201CFileNameu201D);
    But in case you have to ONLY use XSLT mapping then I would suggest to use the same jave code & call it from your XSLT mapping. I never tried such thing you might use couple of jar files too.
    - lalit -

  • How do I get the file names on a customized proof sheet?

    How do I get the file names on a customized proof sheet?

    Actually, I really don't know what you say.
    But when you see the properties of a file in Windows, you can see there are two file size. One is called "SIze" and the other one is called "Size on disk".
    Therefore, I would like to know the size on disk but not just the size.

  • How is it posible to get the File name, size and type from a File out the H

    How is it posible to get the File name, size and type from a File out the HttpServletRequest. I want to upload a File from a client and save it on a server with the client name. I want to conrole before saving the name, type and size of the file.How is it posible to get the File name, size and type from a File out the HttpServletRequest.
    form JSP
    <form name="form" method="post" action="procesuploading.jsp" ENCTYPE="multipart/form-data">
    File: <input type="file" name="filename"/
    Path: <input type="text" readonly="" name="path" value="c:"/
    Saveas: <input type="text" name="saveas"/>
    <input name="submit" type="submit" value="Upload" />
    </form>
    proces JSP
    <%@ page language="java" %>
    <%@ page import="java.util.*" %>
    <%@ page import="FileUploadBean" %>
    <jsp:useBean id="TheBean" scope="page" class="FileUploadBean" />
    <%
    TheBean.doUpload(request);
    %>
    BEAN
    import java.io.*;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletInputStream;
    public class FileUploadBean {
    public void doUpload(HttpServletRequest request) throws IOException
              String melding = "";
              String filename = request.getParameter("saveas");
              String path = request.getParameter("path");
              PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.java")));
              ServletInputStream in = request.getInputStream();
              int i = in.read();
              System.out.println("filename:"+filename);
              System.out.println("path:"+path);
              while (i != -1)
                   pw.print((char) i);
                   i = in.read();
              pw.close();
    }

    Thanks it works great.
    Here an excample from my code
    import org.apache.commons.fileupload.*;
    public class FileUploadBean extends Object implements java.io.Serializable{
    String foutmelding = "geen";
    String path;
    String filename;
    public boolean doUpload(HttpServletRequest request) throws IOException
         try
         // Create a new file upload handler
         FileUpload upload = new FileUpload();
         // Set upload parameters
         upload.setSizeMax(100000);
         upload.setSizeThreshold(100000000);
         upload.setRepositoryPath("/");
         // Parse the request
         List items = upload.parseRequest(request);
         // Process the uploaded fields
         Iterator iter = items.iterator();
         while (iter.hasNext())
         FileItem item = (FileItem) iter.next();
              if (item.isFormField())
                   String stringitem = item.getString();
         else
              String filename = "";
                   int temp = item.getName().lastIndexOf("\\");
                   filename = item.getName().substring(temp,item.getName().length());
                   File bestand = new File(path+filename);
                   if(item.getSize() > SizeMax && SizeMax != -1){foutmelding = "bestand is te groot.";return false;}
                   if(bestand.exists()){foutmelding ="bestand bestaat al";return false;}
                   FileOutputStream fOut = new FileOutputStream(bestand);     
                   BufferedOutputStream bOut = new BufferedOutputStream(fOut);
                   int bytesRead =0;
                   byte[] data = item.get();
                   bOut.write(data, 0 , data.length);     
                   bOut.close();
         catch(Exception e)
              System.out.println("er is een foutontstaan bij het opslaan de een bestand "+e);
              foutmelding = "Bestand opsturen is fout gegaan";
         return true;
         }

  • 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 owner name for the file in ftp using abap ?

    Hi folks ,
    How to get the owner name for the file in ftp using abap ? please help me very ugernt . I tried with all standard FTP commands
    but doest work out me . Helping in this regard highly appreciated ...
    Thanks and regards,
    Swarupa Vanarchi

    Hi
    dont you  have used the os user while calling the FTP_CONNECT FM?
    Hope you are not talking about the user executing the FTP program.
    Else If you are talking about the FTP file creator then its not related to abap as you can handle it by maintaining the user in file name itself.
    May be i am going too far with if and elses here as your question possesses no  clarity.
    Plz elaborate your requirement  before anybody can help.
    Regards
    sateesh

  • How do I get the file name?

    I'm kind of new to javascript -- working with a colleague who has Adobe Acrobat Professional -- I've got an *old* version of Adobe Acrobat and most of the functions don't work -- but how do we get the file name -- we're trying to develop an application -- so if the user opens c:\something.pdf, we'd like to know the file name (something.pdf).
    If we get a fully qualified path, that's fine -- I think I can parse it.
    Thank you in advance.

    The 'paty' property of the 'doc' object has been available since version 3.01.
    Using the following in the JavaScript console when the Acobat JS API Refenece is open:
    this.path;
    returns:
    this.path;
    /C/Program Files/Adobe/Acrobat 8.0/Help/ENU/JS_api_reference.pdf

Maybe you are looking for

  • My ipod doesn't sync

    I added some new music to my itunes library and tried to sync it with my ipod touch but the song don't appear in my ipod touch. With my ipod shuffle it works perfectly but with the ipod touch it just doesn't sync and the songs aren't in my ipod. They

  • 10.5.1 iTunes screen saver gone missing

    I updated to 10.5.1 yesterday. Today before a presentation I turned off my screen saver (and sleep display). After the presentation I went to turn my screen saver back on and the iTunes album art choice seems to be missing! The screen saver was worki

  • Problems creating a db in 11.2.0.1.0

    I have installed the Oracle 11.2.0.1 on Oracle Linux 5.4. Then I run netca to create listener. I start the listener. Then I run dbca to create the database. Just use the general template. Then I set sid and try startup. However it seems that it cant

  • 320 & 128 bit rate in iPhone.

    I haven't found an option that lets you choose the bit rate you want to convert your music to in my iPhone. All my music is 320 bit rate or lossless... So it's going to take a chunk of space. I'm converting the music I want on my iPhone to a 128 bit

  • I need a Tungsten t5 manual, a CD, and a hot sync device for it

    I have been using myEbay purchased Tungsten T5 mostly the calendar function, memos, contacts, etc. However, I would like to be able to hot sync it to my Mac G5 power mac computer with OS X.5.8, both to upload and download between both devices and use