To Find the path of the filename

Hi Guys!
Is it possible in D2K 2.1 to find the path of the filename entered by the user????
My problem is: I use DDE package funct DDE.APP_BEGIN to open a filename (e.g. in this case any HTML file) enterd by the user. But I do not know where the IEXPLORE.EXE lies on each client machine. I think while using this funct, I need to give the full path of the module I want to open the file with. Because when I tried to use following func it gave me some error.
DDE.APP_BEGIN('iexplore.exe c:\file_name');
I hope the prob is clear.
Thanks for the help.
null

I'm glad it worked for you too.
The thing with batch files:
Imagine you want to open to allow the user to open some files (with different extensions) with Wordpad.
My previous solution would work if all the files had .wri extension.
The directory for wordpad.exe is not the same for Windows 95 and Windows NT.
My solution:
create a batch file named vWordpad.bat:
@echo off
"c:\program files\accessories\wordpad.exe" %1In your form trigger,
DDE.APP_BEGIN('vWordpad.bat c:\file_name');Make sure vWordpad.bat in located in a directory included in the OS path (c:\windows95, for example).
Now, if you move your application to a Windows NT machine, all you have to do is change "c:\program files\accessories\wordpad.exe" to "c:\program files\windows nt\accessories\wordpad.exe". No need to change the fmb, recreate the fmx, etc...
Everyone, feel free to comment on this approach.
Pedro.

Similar Messages

  • Function Module to find the Path of the file in the Application Server

    Hi All,
            Any function module available to find the path of the file stored in the application server. Please let me know.
    Thanks.

    Check this code:
      DATA: dl_file TYPE ibipparms-path.    " File name
      CONSTANTS: c_dir       TYPE  rlgrap-filename.
    * F4 filename for Application server
        CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
          EXPORTING
            directory        = c_dir
            filemask         = ' '
          IMPORTING
            serverfile       = dl_file
          EXCEPTIONS
            canceled_by_user = 1
            OTHERS           = 2.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Error while getting the file name'(006).
          EXIT.
        ELSE.
          p_file =  dl_file.
        ENDIF.
    Thanks & Regards,
    Siri.
    Message was edited by:
            Srilatha T

  • How to find the path of the file at enduser system

    Hi  Frndz..
    Am per my requirement i need to read XL file from enduser PC, for this i need to kno the path on the enduser PC i.e . ,lets assume that test.xsl file is there an enduser PC on his desktop , so i need the path where its like  "C:\Docsandsettings\desktop\test.xsl"..
    Plz suggest me
    Regards
    Rajesh

    Hi,
    You have to first upload this file using fileupload UI element.
    Then you can do the rest.
    Following tutorial will explain you it in detail
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    Regards
    Ayyapparaj

  • How to find the path where the program resides

    I need to use the path where the running program file resides.
    My purpose is to make a program where some parameters are in a separate file. I want to have it in the same directory as the .jar program is. This way I could start and run the program from a memory stick.
    Is there a way to get the program path?
    Urpo Pietil?
    Edited by: urpo on Feb 12,:12 AM
    Edited by: urpo on Feb 12,:12 AM

    This will tell you the directory that contains the running program:
    System.getProperty("user.dir")

  • Displaying the path of the file selected by a FileChooser in a TextField

    I'm just getting started with Swing. I developed a simple dialog box that has two text fields and two buttons. The objective is to open two files using those two buttons. I used FileChooser to select the files. Now, I want to display the path of the selected files in their corresponding TextFields. I use the following code to do that.
    final FileChooser fc1 = new FileChooser();
    final FileChooser fc2 = new FileChooser();
    final TextField tf1 = new TextField();
    final TextField tf2 = new TextField();
    private void button1ActionPerformed(ActionEvent evt)
                int returnVal1 = fc1.showOpenDialog(labelPhpFile);
                if (returnVal1 == JFileChooser.APPROVE_OPTION)
                    File file1 = fc1.getSelectedFile();
                    String fileName1 = file1.getName();               
                    String filePath1 = file1.getPath();
                    tf1.setText(filePath1);
    private void button2ActionPerformed(ActionEvent evt)
                int returnVal2 = fc2.showOpenDialog(labelPhpFile);
                if (returnVal2 == JFileChooser.APPROVE_OPTION)
                    File file2 = fc2.getSelectedFile();
                    String fileName2 = file2.getName();               
                    String filePath2 = file2.getPath();
                    tf2.setText(filePath2);
    }The above code works fine only for the first file. Mean the path of the file selected using fc1 is getting displayed in the tf1 TextField. But, the file selected using fc2 is not getting displayed tf2 TextField. Please help me.
    Thank you :)

    h1. The Ubiquitous Newbie Tips
    * DON'T SHOUT!!!
    * Homework dumps will be flamed mercilessly.
    * Have a quick scan through the [Forum FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ].
    h5. Ask a good question
    * Don't forget to actually ask a question. No, The subject line doesn't count.
    * Ask once
        - Don't Crosspost!
        - Two people answering one question independantly is a waste of there time.
    * Don't even talk to me until you've:
        (a) [googled it|http://www.google.com.au/] and
        (b) looked it up in [Sun's Java Tutorials|http://java.sun.com/docs/books/tutorial/] and
        (c) read the relevant section of the [API Docs|http://java.sun.com/javase/6/docs/api/index-files/index-1.html] and maybe even
        (d) referred to the JLS (for "advanced" questions).
    * [Good questions|http://www.catb.org/~esr/faqs/smart-questions.html#intro] get better Answers. It's a fact. Trust me on this one.
        - Lots of regulars on these forums simply don't read badly written questions. It's just too frustrating.
          - FFS spare us the SMS and L33t speak! Pull your pants up, and get a hair cut!
        - Often you discover your own mistake whilst forming a "Good question".
        - Many of the regulars on these forums will bend over backwards to help with a "Good question",
          especially to a nuggetty problem, because they're interested in the answer.
    * Improve your chances of getting laid tonight by writing an SSCCE
        - For you normal people, That's a: Short Self-Contained Compilable Example.
        - Short is sweet: No-one wants to wade through 5000 lines to find your syntax errors!
        - Often you discover your own mistake whilst writing an SSCCE.
        - Solving your own problem yields a sense of accomplishment ;-)
    h5. Formatting Matters
    * Post your code between a pair of &#123;code} tags
        - That is: &#123;code} ... your code goes here ... &#123;code}
        - This makes your code easier to read by preserving whitespace and highlighting java syntax.
        - Copy&paste your source code directly from your editor. The forum editor basically sucks.
        - The forums tabwidth is 8, as per [the java coding conventions|http://java.sun.com/docs/codeconv/].
          - Indents will go jagged if your tabwidth!=8 and you've mixed tabs and spaces.
          - Lines longer than 80 characters should be wrapped.
          - Proper indentation illustrates program logic.
    * Post your error messages between a pair of &#123;code} tags:
        - That is: &#123;code} ... errors here ... &#123;code}
        - To make it easier for us to find, Mark the erroneous line(s) in your source-code. For example:
            System.out.println("Your momma!); // <<<< ERROR 1
        - Note that error messages are rendered basically useless if the code has been
          modified AT ALL since the error message was produced.
        - Here's [How to read a stacktrace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/].
    * The forum editor has a "Preview" pane. Use it.
        - If you're new around here you'll probably find the "Rich Text" view is easier to use.
        - WARNING: Swapping from "Plain Text" view to "Rich Text" scrambles the markup!
        - To see how a posted "special effect" is done, click reply then click the quote button.
    If you (the newbie) have covered these bases *you deserve, and can therefore expect, GOOD answers!*
    h1. The pledge!
    We the New To Java regulars do hereby pledge to refrain from flaming anybody, no matter how gumbyish the question, if the OP has demonstrably tried to cover these bases. The rest are fair game.

  • How to get the Path of the Current File using Import & Export File -Reg.

    Dear all,
    I have a mega (big) doubt. I have manually inserted the Figures from the figure folders. Now i need, fully automated. So How can I get the Figure path
    Example :
    PMString path = "E://development/Figures/";
    now i checked, How many subFolders is there in "path", get the All Subfolders and check to the Article Name.
    Example
    Article Name == subFolder name then get the Files from the SubFolders(E://development/Figures/ChapterF/*.eps files").
    now I paste the Document using to For Loop.
    Please any one can suggest me, How can We get the Path in SDK.
    Note:
    Should I have to create the relative path by myself?
    No method supplied in SDK to do this directly?
    Please I need a help of this Query as soon as posible.
    Thanks & Regards
    T.R.Harihara SudhaN

    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 path of the web-archive on the local filesystem?? [Apache]

    Hello all,
    Im running a webapplication on a tomcat server.
    I need to find out the path of the web-archive on the local filesystem to access several files.
    How can I do that with out having an instance of HttpRequest or whatever??

    Hello Bruce.
    Please take a look at the following KBase article.  It has a sample that will retrieve the folder structure for a specified Crystal Report template based on the instance name in the file store.  The sample there can be easily modified so that it is based on a specific infoObject id.
    1549728 - How to find the folder structure in the CMC of a report template based on the instance file name in the output file store.
    The KBase can be retrieve from the following link:
    https://bosap-support.wdf.sap.corp/sap/support/notes/1549728
    Please note that the KBase article is retrieved through the Service MarketPlace.
    I hope this helps.
    Regards.
    - Robert

  • How to get the path of the image stored in sap??

    Hi All
    The problem is
    While making an entry in standard there is a field called documents through which we attach our images in sap.
    How to get the path of the image stored with the corresponding order so that the image can be displayed while we are creating a report.
    I know how to upload the image while creating a report using docking control.
    I am not able to get the path of the image stored...
    Please Help
    Thanks in advance..
    Pooja

    I am not aware of exactly which tables are used for storing the attached doc. details, but we have worked in the similar requiremnent.
    What you can do is .... before uploading the image to any order, try swich on the SQL trace ST05 and after upload switch off.
    The log will display what are the tables involved while storing the image. And you can easily find out the image location.

  • How to get the path of the cache directory ?

    Hi everyone,
    I need to get the path of the cache directory to copy files into it (these files are security files that are necessary to encrypt data).
    Maybe there is a jnlp.jar to have object that implements a method getCachePath() ? But I can't find it.
    Any ideas ?. thanks.

    you can find the cache location by finding the location of the jar file you are running from:
    URL resource =
    this.getClass().getClassLoader().getResource("testResource");
    if (resource != null) {
    String s = resource.toString();
    if (s.startsWith("jar:")) {
    int index = s.indexOf("!");
    if (index > 4) {
    String fileurl = s.substring(4,index);
    if (fileurl.startswith("file:")) {
    String path = fileurl.substring(5);
    // now path is the path to the jar file in the cache containing the resource
    /Dietz

  • Defining the path for the use of beans in a JSP

              Hello,
              I would like to use a bean in a JSP file, via the <jsp:usebean> directive.
              I didn't find any property (weblogic property) which could define the path
              to the directory of my beans classes.
              So :
              1) i have put the path of this directory in the weblogic classpath in the weblogic
              start script.
              2) i made the same with the java classpath.
              Both solutions don't work at all.
              Any suggestion would be appreciated.
              Thanks in advance.
              

              We use the \weblogic\myserver\serverclasses for beans..
              of course we pack beans into jar files, and these jar files are included into
              the wls classpath..
              "Sylvain R." <[email protected]> wrote:
              >
              >Hello,
              >I would like to use a bean in a JSP file, via the <jsp:usebean> directive.
              >I didn't find any property (weblogic property) which could define the
              >path
              > to the directory of my beans classes.
              >So :
              >1) i have put the path of this directory in the weblogic classpath in
              >the weblogic
              >start script.
              >2) i made the same with the java classpath.
              >
              >Both solutions don't work at all.
              >
              >Any suggestion would be appreciated.
              >Thanks in advance.
              >
              

  • Problem with sqlplus with whitespace in the path of the @ command

    I'm running Oracle 11g on Linux and I'm trying to run a script which will create my database. This script runs fine on windows, but when I test it on Linux, I get the following error:
    SP2-0556: Invalid File NameThe problem may be that the path to the file name has a space in it. I'm going to simplify the problem down to one of the many commands I run in the file to make it simple. The sample command I'm trying to run looks like this:
    sqlplus [uname]/[pw] @'../database/My Schema/create_sequence.sql'the create_sequence.sql file has two simple create sequence commands that run fine by themselves. I strongly suspect it is due to the white space because when I change the directory name from My Schema to MySchema and alter the above sqlplus command accordingly, the script runs fine.
    Like I said, this script works in windows with the spaces, but not in Linux. I suspect spaces may not be supported, but I was wondering if anyone knew any different or it there is a work-around?
    side note: running a command like:
    more ../database/My\ Schema/create_sequence.sqlor
    more '../database/My Schema/create_sequence.sql'prints the contents of the file to the console as you would expect. So, I think this is sqlplus (and linux) specific.
    Edited by: user10887698 on Jul 28, 2009 4:21 PM
    code markup!!!

    user10887698 wrote:
    I'm running Oracle 11g on Linux ...
    ..when I change the directory name from My Schema to MySchema and alter the above sqlplus command accordingly, the script runs fine.i really can't see why you are considering this as a problem.
    On linux, you can't create directory that contains spaces between letters, like let say : fol der. Doing a mkdir fol der would create two folders,
    one named fol and the other named der.
    By information you provided , it's obvious that the exact and the correct full path to the create_sequence.sql file is ...database/MySchema/create_sequence.sql.
    Can you position yourself in the directory where create_sequence.sql file is and type pwd to confirm the correct path?

  • Can the path to the iTunes Music folder be locked?

    I'm trying to simplify the results of my own occasional user error.
    Can the path to the iTunes Music folder be locked?
    I have my library stored on an external drive that I keep turned off when not in use. If I accidentally start iTunes with that drive off, it recreates the original iTunes Music folder and directs itself there.
    Can that behavior be stopped? It seems like there should be a way for iTunes to send a pop up or something, rather than this automated over ride to manual settings.

    Yeah, I know I don't have an end of the world scenario here.
    But just remounting the drive doesn't do it. I have to go back into iTunes and reset the folder location. Then wait several minutes as it all reorganizes itself.
    I know just leaving the drive on is the easiest answer. It causes too much of a domestic dispute about all the blinking boxes I have running all the time. I have convinced her that the green one on the AEBS has to be on if she wants internet.

  • What is the path in the filesystem for the deployed Wendynpro application .

    What is the path in the filesystem for the deployed Wendynpro application in the WAB AS
    We have a different version of webdynpro application running in production and non production , what is the process for overwriting the deployed application from one enviorment to another.
    Please help..

    Hi,
    What is the path in the filesystem for the deployed Wendynpro application in the WAB AS
    If you search for your component under the /usr/<SID> folder
    We have a different version of webdynpro application running in production and non production , what is the process for overwriting the deployed application from one enviorment to another.
    If you have NWDI in place CTS would help in this, else you can deploy your application using sdm.
    in CE you can deploy the application from NWDS.
    Regards
    Ayyapparaj

  • How to get the Path of the WebDynpro page

    Hi All,
    Can any one say how to get the path of the JSPDynPage ina Portlet in Portal Application.
    Becoz i have to display that Page in another JSPDynPagee
    Thanks in Advance....

    Hi,
    You can call your JSPDynPage component by calling the URL as:
    http://localhost:50000/irj/servlet/prt/portal/prtroot/YourApplicationName.YourComponentName
    Check this:
    Calling portal component
    Greetings,
    Praveen Gudapati
    [Points are welcome for helpful answers]

  • Difficult: Drag and Drop: how to get the path of the drag-source ??

    I have to write an applet, after a "Drag&Drop"-Operation from a MS-Word-document to this applet, the applet is supposed to show the path of the document.
    Does anyone know how to do this ?
    thanks

    http://forum.java.sun.com/thread.jsp?forum=4&thread=300727

Maybe you are looking for

  • How to get Number of Column in Excel file

    Hi All,                My requirment is to get Number of Column in Excel file which i want to upload,   so please suggest if there is any possible way to get this functionality. Thanks Anirudh

  • ITunes will not install on my computer...

    okay so heres how it happens to be... I got a new(well somewhat old) laptop a few days ago,because my old desktop computer...was garbage. I cna download the iTunes install jsut fine,it's when i get to the actual install that I have problems. it gets

  • Found: Lost Black, 30GB iPOD w/video playback

    When: On a Saturday afternoon some time in the first three months of 06. Where: On the sidewalk near the Century 20 Theatre in Daly City, California. This iPOD has identifying information engraved on the back. Will happily return to owner. Dell   Win

  • Mac Book Pro 17" battery

    Anyone else experiencing a bulging battery? Yup, the thing is about to explode... it's coming apart. I bought my first generation MacBook Pro 17" just over a year ago. About 2 months ago the optical drive stopped working. So I took it to an independe

  • Editing from Nikon D300 s in PE7

    Hi all, Has anyone edited video shot with the Nikon D300 S in PE7? I have a client who is buying one, and I'm wondering what kind of adventure awaits me. Stan