How to get file path in the form \\filer01\dir\index.htm

Hi,
after selecting a file using the FileChooser dialog, i would like to convert the file path like "H:\index.htm" into a form like "\\filer01\dir\index.htm".
On my system, the logical device name H:\ is mapped to a directory on a file server "filer01".
Is there any possibility to do this conversion?
Thanks in advance.

hi,
i dont think java has a way of figuring out the actual mappings for a drive, you can retrive all drives that are present using the following code
File [] roots = File.listRoots();
then you could just iterate through the roots some of which may be mapped (but you cant figure out which is mapped and which is not).
So i guess the best way to do it is to have a Properties file with key,value mappings. for eg
h:\\, \\file01\dir\..
and then read the value from the Properties file, now if you want this for accessing a resource across the network you dont require to get the actual mapping, you can still use the mapped drive as you would use a unmapped drive.
hope this helpz
cheerz
ynkrish

Similar Messages

  • How to get file name of the form attachment?

    Hi,
    is there anybody who is able to help me with the following problem???
    I started my process from Workspace ES and as a first step I attached one locale file (IMG.JPG or IMG.TIF e.g.) as a form attachment. I used "Attachments" bookmark in the Workspace ES.
    I need to get file name of attached file in the process!!!
    I tried to use "getTaskAttachments" component to get file name of form attachment but without success. This component successfully obtained attached file an stored it in the variable (type list, subtype document) but didn't produce all file attribute informations such as basename or Content Type:
    Is there some possibility to obtain file name (including file extension) by using "standard" tools and components of ALC?
    Thanks for your suggestions.

    Hi LekomDev,
    I faced the same situation some time back and this is what I know.
    Based on the file type few of the attributes will or will not be populated. (This is what the official documentation says about Document attributes)
    The file name that you are looking for would mostly be in 'name' attribute of Document object. The 'wsfilename' attribute is the atrribute which gets used to show the file name into Attachments tab of the workspace.
    So, if you are just interested in knowing the filenames then 'name' attribute is the place that you are looking for.
    But if you are trying to solve an issue in which Attachments against a Task isn't showing the filenames properly then you would need to copy the 'name' attribute value into 'wsfilename' attribute and then the Attachmetns against a Task would have the correct names.
    Tip: Use the Record and Playback option of the workbench to inspect the Document variable and you would see all of the values for a Document variable at desired step in your orchestration.
    hope this helps,
    cheers,
    Parth Pandya
    Blog: http://livecyclekarma.wordpress.com

  • How to get absolute path of a form within the Forms

    Aslam o Alikum (Hi)
    How to get absolute path of a form within the Forms 6i or 9i
    For example
    i am running a from "abc.fmx" from C:\myfolder directory
    can i get the form path 'C:\myfolder' by calling any any function from "abc.fmb"

    There is no direct call that will always work. What you need to do is call get_application_property(current_form). This may have the full path in it, depending on if that path was defined when the form was launched. If there is no path, then you need to use TOOL_ENV.GETVAR to read the Forms<nn>PATH and the ORACLEPATH, parse those out into individual directories and then check for the FMX in each.
    I already have some code to do all this for you see:
    http://www.groundside.com/blog/content/DuncanMills/Oracle+Forms/?permalink=4A389E73AE26506826E9BED9155D2097.txt

  • How to get file path?

    Hi all,
    I have a tcode ysd_gr. When I execute it, it has one select option & I entered the values as *.csv. It gave 6 csv files(only file names) & I want to retreive data from one file.
    So I need to find the file path. The functional consultants told that the files are in Application server (there are more than 5 application servers are used here).
    So I need to know how to find the file path  and in which application server the file is placed.
    Thanks in advance,
    Vijay.

    Go to t-code AL11 and give the path name excluding the file name:
    I mean for example the name is as below:
    D:\usr\sap\IDS\DVEBMGS00\data\test.csv
    here test.csv is the file name.
    So go to AL11 and give upto D:\usr\sap\IDS\DVEBMGS00\data and dauble click on it and search for the file name.
    Hope this will solve your problem.
    Reward if helpful.
    Thank you.

  • How to get file name on the base of extension

    hi
    reply me
    how to get the filename on the base of extension from the
    current directory......
    for example
    i create file with the "igg" extension and save in the folder
    where the exe file of director save....
    i want when exe run then exe file read filename of the
    define( "igg" ) extension with out path just name of the file with
    igg extension
    tel me how
    regards
    farhana khan

    Here's a solution that requires no xtras:
    on GetFilesWithExtension(aFolderPath, aExtension)
    -- INPUT: <aFolderPath> should be a valid string
    folder path
    -- <aExtension> may be a string file extension,
    without the
    -- dot. For example: "txt" or "igg"
    -- OUTPUT: Returns an error symbol or a linear list of file
    names
    -- in the given folder. If an extension is given, only
    -- files with the given extension will be listed. If not,
    -- all files and folders will be listed.
    vFileList = []
    if not stringP(aFolderPath) then
    return #stringPathExpected
    end if
    vIgnoreExtension = not stringP(aExtension)
    vDelimiter = the itemDelimiter
    the itemDelimiter = "."
    n = 0
    repeat while TRUE
    n = n + 1
    vFileName = getNthFileNameInFolder(aFolderPath, n)
    if vFileName = "" then
    exit repeat
    end if
    if vIgnoreExtension then
    vFileList.append(vFileName)
    else if the last item of vFileName = aExtension then
    vFileList.append(vFileName)
    end if
    end repeat
    the itemDelimiter = vDelimiter
    return vFileList
    end GetFilesWithExtension
    You can also use
    Buddy API's baFileList,
    which allows you to do wildcard searching.

  • How to get some statistics on the form.

      I have to run some statistics about my form. There is some kind of macro that you can install and will give you a number of fields and subforms on your form…can someone please provide a link to the tool?

    You can use a recursive function to determine all objects with a specific className.
    This example looks for subforms, fields and script under beginning with node "xfa.template".
    function findNodes(vNode, vSubform, vField, vScript) {
        if (vNode.className === "subform") {
            vSubform.push(vNode.somExpression);
        } else if (vNode.className === "field") {
            vField.push(vNode.somExpression);
        } else if (vNode.className === "script") {
            vScript.push(vNode.somExpression);
        for (var i = 0; i < vNode.nodes.length; i++) {
            findNodes(vNode.nodes.item(i), vSubform, vField, vScript);
    var nSubform = [];
    var nField = [];
    var nScript = [];
    findNodes(xfa.template, nSubform, nField, nScript);
    // In a macro use
    // desiner.alert("Subforms:\t" + nSubform.length.toString() + "\nFields:\t" + nField.length.toString() + "\nScripts:\t" + nScript.length.toString());
    // In Designer use
    xfa.host.messageBox("Subforms:\t" + nSubform.length.toString() + "\nFields:\t" + nField.length.toString() + "\nScripts:\t" + nScript.length.toString());

  • How to get requisiton number on the form after running requisition import

    Hi guys,
    My requirement is populated requisition number on custom form after requisition created.plz tell me link between concurrent request id and standard requisition tables
    where i can fetch requisition number after running requisition import program. plz give sql script.
    thanks.....

    Hi;
    Did you check etrm site?
    Regard
    Helios

  • What is the procedure to add "index.htm" to my homepage?

    I have a PC, Win 7 Pro, using Contribute 6.5
    I am very inexperience at this program.

    So if you type out the URL as http://www.mywebsite/ you get a 404? If you are sure that you have a file sitting in the root directory named index.htm (or even index.html) and you get a 404 when typing in the above, you may want to talk to your website host.
    But yes, in the meantime you should just be able to do the reverse of the above instructions I gave you and save the file out as MyWebSite.htm until you get it figured out.
    (by the way, you don't need capital letters in your URL. They do not serve any purpose)
    If you'd like and you don't want to use your URL on a public forum, you can private message your URL to me and I can take a look (assuming that the site is safe to look at from work) and see what's up. Or, you can use a URL shortener such as Google URL Shortener

  • How to get images dynamically from database without file paths in the table field

    I have a MS-Access database. I am working with ASP.NET. In the database there is product table in which I have "CodeNo" as a field which is a text field, and the product codes like "SM-R-2035". I also have another field "Image" which is also a text field and which have a file path in it corresponding to the particular product Image (e.g. Images\Products\SM-R-2035.jpg). So far every thing is ok. I have to update this site very frequently and lots of images are added each and every time. Its a tedious work to type the paths and file name every time and it also take a lot of time.
    What I am asking is : Is it possible to get images from a specific folder at runtime which is referenced by the "code no" itself and not the file path from the database. (Say at run time the "code no" is referenced from the database and the corresponding image is loaded dynamically from the specified folder). In other word I want to avoid the tedious work of typing.
    Can any one help with this issue. Any other simple suggestions are welcome.

    All you need to do is simple concatenation to obtain the path for the image file.  You didn't mention whether you are using VB.Net, C# or some other language to do your coding.
    If the code in your database is SM-R-2035, the file name is SM-R-2035.jpg and the path to the images foilder is Images\Products\SM-R-2035.jpg, Conceptually here is what you need to do:
    dim code_var
    dim path_var
    code_var = the code you obtain from your relevant field in the database
    path_var = "Images\Products\" & code_var & ".jpg"
    Now path_var is what you would call to obtain the image from your images folder.

  • How to get full path in file browse item

    Hi
    I have a file item. When I submit the form and store and value in db, then the file path is stored as numbers and appended to the file name. I undestand that this is because of some wwv flow files index or something . How to get the file path? Anybody...

    For security/privacy reasons recent versions of browsers by default do not send local file path information from File Browse items to the server, nor expose the file path in the control's JavaScript methods. Firefox, Safari and Chrome only provide the filename. IE6 & IE7 still yield the path in Windows format. IE8 and Opera have adopted an irritating approach of replacing the path with a wholly imaginary "C:\fakepath\".
    Changes to IE's security config can enable the path to be exposed in IE8, but I don't think it will be available via <tt>apex_application_files</tt>.
    For more information see:
    http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018980.html
    http://blogs.msdn.com/ie/archive/2009/03/20/rtm-platform-changes.aspx

  • Sql for extract file path without file_name form the folumn value

    Dear Experts,
    can someone give the sql script to extract file path without file_name form the folumn value.
    can someome provide sql to extract only path in the column value.
    column value :
    /data/rrsapus/oradata22/rrsa_25122011rpsp_arpch.rsp
    i need output like this */data/rrsapus/oradata22/*

    Hi,
    Welcome to the forum!
    INSTR and SUBSTR is probably the most efficient way. Use INSTR to find where the last '/' is, and SUBSTR to get that many characters, starting from the beginning of the string.
    INSTR and SUBSTR (and REGEXP_SUBSTR, and REGEXP_REPLACE, and RTRIM, and REPLACE, and all the other bullt-in functions) are documented in the SQL language manual:
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/index.htm
    REGEXP_SUBSTR or REGEXP_REPLACE would also do the job, perhaps with a little less code, but maybe not as efficiently.
    Here's a more creative way:
    SELECT     RTRIM ( str
               , REPLACE (str, '/')
               )          AS file_path
    FROM     table_x
    ;What results do you want if str does not contain a '/'?

  • Function module to get the file path in the system for TEMP folder

    Hi All,
    Is there any function module that I can use to get the file path in the system for TEMP folder.
    I mean, i am supposed to give only TEMP as the input for that function module and I need to get the path of that in the system as the output.
    I am unsing 4.0 version.
    Please advice.
    Regards
    Ramesh

    In Higher versions, we can use the below code:
    call method CL_GUI_FRONTEND_SERVICES=>ENVIRONMENT_GET_VARIABLE
        exporting
          VARIABLE   = 'TEMP'
        importing
          VALUE      = LV_TMP
        exceptions
          CNTL_ERROR = 1
          others     = 2.
      if SY-SUBRC <> 0.
        message id SY-MSGID type SY-MSGTY number SY-MSGNO
        with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      call method CL_GUI_CFW=>FLUSH
        exceptions
          CNTL_SYSTEM_ERROR = 1
          CNTL_ERROR        = 2
          others            = 3.
      if SY-SUBRC <> 0.
    Error handling
      endif.
      concatenate lv_tmp '\' into folder_path.
    But need to know in the lower versions like 3.1h and 4.0,

  • CS2/CS3/CS4: Cannot get file path in Unicode of the current document on Windows

    Hi All,
    In my automation plugin I need to have full absolute path of the opened document with any possible non-English letters. Using SDK examples Listener and Getter that come with Photoshop SDK the full absolute path which I obtain is in the default ANSI code page (CP_ACP) and I can convert it to Unicode using MultiByteToWideChar() API. However this works well when I have corresponding to document name language set in the "Control Panel -> Regional and Language Options -> Advanced -> Select a language to match the language version of the non-Unicode programs you want to use." For example if name of the document has Russian letters and chosen language in "Regional and Language Options" is also Russian the described conversion works well. If I change "Regional and Language Options" to English for example, full path returned by Photoshop SDK API (AliasToFullPath in PIUFile.cpp) for the document with Russian letters will contain "????????.psd" symbols.
    So I need to have an ability to get absolute file path in Unicode. Is it possible in Photoshop CS2/CS3/CS4 for Windows? I have searched forum and SDK but could not find info on it.
    Is it possible to have native HANDLE of the opened file to get file info using Windows API?
    Please advice.
    Below given slightly modified code from Photoshop CS3 which I use to get absolute file pat of the opened document.
    Thanks and regards,
    Sergey
    std::string outFilePath;
    int32 theID = 0;
    SPErr error = kSPNoError;
    error = PIUGetInfo(classDocument, keyDocumentID, &theID, NULL);
    if (error == kSPNoError)
    Handle theFileHandle = NULL;
    error = PIUGetInfoByID(theID, classDocument, keyFileReference, &theFileHandle, NULL);
    if (error == kSPNoError)
    int32 length = sPSHandle->GetSize(theFileHandle);
    Boolean oldLock = FALSE;
    Ptr pointer = NULL;
    sPSHandle->SetLock(theFileHandle, true, &pointer, &oldLock);
    if (pointer != NULL)
    outFilePath = (char*)pointer;
    sPSHandle->SetLock(theFileHandle, oldLock, &pointer, &oldLock);

    Hi All,
    Does anybody know, whether it is possible to get Unicode file path of the current document in Photoshop via Photoshop SDK API or without them?
    Thanks,
    Serhiy

  • How do we find out the file path which the IDOC is stored.

    Hi,
    If we use T-code: AL11, we can see the file path of the Unix server.  And some IDOC outbound file is also stored in some file path after generated.
    If i generated an outbound IDOC, how do i know in which file path it stored??
    Thanks

    Hi,
    Go to control record of the outbound IDOC.
    go to partner tab, check the port under sender information.
    the outbound file path will be configured with your port.
    Use T-code WE21, the concerned port will be available under section 'File'
    Directory under tab Outbound file will show the path under which file has been stored.

  • How do you bulk download all files submitted to the form?

    How do you bulk download all files submitted to the form?

    I'm using the fileReference code to pull it from my server
    but I dojn't understand how to specify that it needs to be saved as
    an mp3
    below is an example of the code:
    import flash.net.FileReference;
    var fileRef:FileReference = new FileReference();
    fileRef.addListener(listener);
    var url:String = "URL link here";
    if(!fileRef.download(url, "my audio.mp3")) {
    trace("dialog box failed to open.");
    }

Maybe you are looking for

  • Project stops at a certain frame

    I have been scanning these forums and I have not come across a fix for the problem I am having. Also, please keep in mind I am somewhat of a AE Novice, so if the fix is simple don't blame me for not finding it Basically, I am trying to render a loopi

  • How can I implement the connection pool in my java stored procedure

    my java stored procedures (in database 'B') have to connect to another oracle database ,let's say 'A'. And how can I implement the behavior like the so-called connection pool in my java stored procedure in 'B', as below. 1. database B, has 2 java sto

  • FCP won't run with Compressor open

    I have FCP 6 and the latest Compressor. I had no problem exporting my current file through compressor in the past. But, now, out of the blue, when I export the file to compressor, the color wheel instantly appears in FCP and the program will not resp

  • Windows Server batch to resize TEMP tablespace.

    I was wondering if it's possible to use windows server 2003 batch jobs to RESIZE TEMP tablespace. Here are some details: Windows Server 2003 Oracle 10gR2 We do a windows batch job to backup all files on Oracle directory (.ctl, .dbf, etc) to a differe

  • Widgets gone after upgrade to 10.4.8

    Hi I upgraded my system after a security update prompted me to do so. When it was all done, my computer was completley different - the two main things that bother me is that: 1. almost all my widgets, even the standard mac ones (weather, dictionary e