Obtain UNC path from get_file_name?

Is there a way of obtaining a UNC pathname from a file returned from get_file_name? For example, if \\dummy is mapped to x: is there a way we can determine \\dummy from x: returned from get_file_name?
We need this as we need to work with fully qualified path names under Forms 9i.
Thanks
Richard

File f = new File("F:\\121526\\Project\\Images\\juventus.jpg");
String name = f.getname();or
String s = "F:\\121526\\Project\\Images\\juventus.jpg";
String name = s.substring(s.lastIndexOf('\\'));or to be portable
String s = "F:\\121526\\Project\\Images\\juventus.jpg";
String name = s.substring(s.lastIndexOf(File.separatorChar));

Similar Messages

  • Open a file in UNC path from jsp page

    Hi,
    it might be simple but I don't know how i can achieve this,
    I have a UNC path to a remote computer something like this,
    \\ComputerName\SharedFolder\ResourceFileName
    i can open this file from windows by typing the above in Windowes explorer or something like this in browser file://ComputerName/SharedFolder/myfile.txt
    I want a simple jsp page that will have a hyperlink or a button which when clicked should prompt me with a dialog to open/save/cancel the file. it should not open the text fine inside the browser itself. when i click open it should open the file in appropriate viewer(i think this is judged by the mimetypes set on my machine).
    Thanks in Advance.

    khana6454 wrote:
    I want a simple jsp page that will have a hyperlink or a button which when clicked should prompt me with a dialog to open/save/cancel the file. it should not open the text fine inside the browser itself. when i click open it should open the file in appropriate viewer(i think this is judged by the mimetypes set on my machine).You need to set the content disposition to 'attachment' rather than 'inline' (which is default).
    You may find this FileServlet example useful: [http://balusc.blogspot.com/2007/07/fileservlet.html].
    That said, the file needs to be located on the server machine, not on the client machine. If you want to open files from the client machine, rather write a client side application which you can integrate in your webpage, e.g. a signed applet or web start application (jnlp).

  • Unable to write to a UNC path from a SAP program

    Hi All
    We have just migrated our first server in an OS/DB migration from UNIX to Windows and the developers are trying to convert all our jobs/programs in SAP to write to Windows UNC paths instead of unix directories but we cannot get it to write files to the UNC paths.
    OS = Win 2008 SR2
    DB = Oracle 11.2
    SAP = ERP 6 / ECC 6
    Example path =
    hostname.domainname\directory$
    Can anybody help us please.
    Thanks
    Steve

    Thanks Tony & Manuel
    We believe that we have checked and rechecked all the necessary permissions on the share itself and we know we can resolve the FQDN from the SAP server. The server team here were able to monitor which user SAP was using to try and access these shares and it turns out to be the service account SAPService<SID>. Which surprised me a bit as I thought it would be <sid>adm. Next we tried logging into the SAP server as SAPService<SID> and mapping the UNC path and we were able to write to it so the inference is that the permissions are OK.
    I was wondering if there's something within SAP itself that we need to turn on to make it understand UNC paths. We ran function module EPS_GET_DIRECTORY_LISTING in SE37 and were able to read from the UNC path. But as yet we can't get any of our SAP programs to write to them.
    Thanks
    Steve

  • Sharepoint 2013 Does not open files using UNC path from Server

    Hi All,
    Just setup our new 2013 sharepoint intranet site , I tried adding a hyperlink to a document stored on our server using a UNC path file://servername/share/filename.doc but when i click on it it takes me to a blank Webpage in a new tab.
    I have turned on "open client applications" in the site collection features hoping that would help ....buuuuuut it did not.
    Also tried variations in the UNC path eg: \\servername\share\filename.doc etc..
    Any help would be greatly appreciated
    Thanks

    Open start run > type > file://servername/share/filename.doc Does this works
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/63b229de-ce4a-42be-b209-2c0f33d4b0d5/problem-opening-an-access-file-from-a-unc-file-link-in-sharepoint?forum=sharepointgeneralprevious
    Actually the problem I described is an Internet Explorer issue and I will try to get resolution in the appropriate forum.  IE exhibits the described behavior whether the link is in a Sharepoint site page, or in a regular non-Sharepoint web page. 
    Mozilla does not have the issue.
    Check below:
    http://social.msdn.microsoft.com/Forums/en-US/3f2c34cc-5686-4e03-ba26-092aaa29ff33/link-from-document-library-to-unc-path
    If this helped you resolve your issue, please mark it Answered

  • Browsing Unc Path from sharepoint application

    I have a link which will open an unc path in a separate window. I have used simple window.location to open that. But it is not working on NON-IE browser..
    Can anyone help me on that?
    Thanks in Advance..

    >> Any of the above works fine for IE. But it does not work in Mozilla/Google
    Chrome..
    This means that it is not a SharePoint related question, but one of cross-browser compatibility. See here for a similar question where a comment classifies the perceived "correct" behaviour as a security hole: http://stackoverflow.com/questions/19030432/how-do-you-open-a-file-folder-through-a-link-on-website-in-firefox-and-chrome
    cheers, teylyn

  • Use UNC path from Active Directory to derive network home location

    Good Morning
    I am trying to get my Macbooks to conenct to a Windows Server 2003 home directory. I have followed the steps in the following article with no luck:
    http://docs.info.apple.com/article.html?path=serveradmin/10.4/en/c7od49.html
    I can bind to the Microsoft Active Directory with no problems and I can connect to the file share on the server that I want to make the network home location, but I can't get it to work automatically as I would expect it to.
    We will have hundreds of users connecting that will need their home folders redirected to the network folder location.
    Any help would be appreciated.
    Thanks

    I forgot to mention that before upgrading to 10.8.4 the login item below was present:
    Item: SMB://network path
    Kind: Unknown
    After the upgrade:
    Item: Unknown
    Kind: Unknown
    After restart it disappears and never returns (again, this only occurs for admins)

  • Open 2nd PDF from UNC-path fails

    Hallo,
    I use Adobe Reader 11.0.08 on Windows7 SP1 (Enterprise) and I try to open PDF-files from UNC-path. The first attempt is successful. If Adobe Reader is still opened, the attempt to open a 2nd PDF-file from (same or other) UNC-path in Windows Explorer does not work without any error message. The file does not open.
    The following attempts were successful or not:
    (drive P:\ = \\domain\dfs$)
    Double-click on \\domain\dfs$\path\file1.pdf opens the file.
    Double-click on \\domain\dfs$\path\file2.pdf does not open the file - no error message.
    Double-click on P:\path\file2.pdf opens the file.
    In Adobe Reader File - Open - \\domain\dfs$\path\file2.pdf opens the file too.
    Double-click on \\domain\dfs$\path\file2.pdf opens the file.
    Double-click on \\domain\dfs$\path\file1.pdf does not open the file - no error message.
    Double-click on P:\path\file1.pdf opens the file.
    In Adobe Reader File - Open - \\domain\dfs$\path\file1.pdf opens the file too.
    Double-click on P:\path\file1.pdf opens the file.
    Double-click on \\domain\dfs$\path\file2.pdf does not open the file - no error message.
    Double-click on P:\path\file2.pdf opens the file.
    Double-click on P:\path\file2.pdf opens the file.
    Double-click on \\domain\dfs$\path\file1.pdf does not open the file - no error message.
    Double-click on P:\path\file1.pdf opens the file.
    If Adobe Reader is still opened, but no file is opened:
    Double-click on \\domain\dfs$\path\file1.pdf does not open the file - no error message.
    Double-click on P:\path\file1.pdf opens the file.
    As you can see: If Adobe Reader is still opened, I can't open a PDF-file from UNC-path from Explorer. But that's what we need. Our Frontend-application opens an Explorer window and the user has to choose the PDF-files to open via double-click. It would be a very roundabout way to copy the Location from Explorer to open the file in Adobe Reader. We'd like to open the first and all other files for the same session from Explorer via double-click.
    Sure, if I disable protected mode every attempt works fine but unfortunatelly it is no permitted option to disable protected mode (security policy) - it has to be enabled.
    Each change in "ProtectedModeWhitelistConfig.txt" was not successful. For information its current config that works as mentioned above:
    ; Files Section
    FILES_ALLOW_ANY = \??\UNC\domain\dfs$\*
    (no entries in other sections)
    How can I open every PDF-file for a session from UNC-path via double-click from Explorer if Adobe Reader is still opened ?
    Thanks in advance for any help.
    Lisa

    Hi Lisa,
    Can you please update your Reader to latest version "Adobe Reader 11.0.9" and verify that the issue still occurs.
    Thanks,
    Shakti K

  • Store unc path in database

    Hi I have an application that needs to store links to files on various servers so I would like to store the unc path in the database - is it possible to get the unc path from the file browse item ?
    I can load the files to the database but these files might change
    Any thoughts

    indhu wrote:
    > storing images into database and latter fetching it shows a error. so
    > what i thought is instead of storing the image directly into the
    > database its better to store the image path. but my problem is how to
    > store the image path into the database?can you give me an example
    Convert it to a string with Path To String conversion function?
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Could not find (UNC path) Error

    I have a few machines (not all machines) with a single interface that get an error on a bundle, "Unexpected error installing file. Error: Could not find the directory \\172.16.8.34\installs$\ENH-Source", however, from that machine I can manually access that UNC path from a Run line and see the contents just fine. So, what gives?

    Debug log on one offending machine simply says:
    Code:
    [DEBUG] [11/30/2014 23:35:08.893] [1344] [ZenworksWindowsService] [25] [] [Copy Directory] [] [Source directory \\172.16.8.34\installs$\ENH-Source does not exist.] [] []
    [DEBUG] [11/30/2014 23:35:08.905] [1344] [ZenworksWindowsService] [25] [FLastname] [ActionManager] [] [Action handler Copy Directory Action finished processing Copy ENH Source with error: GenericActions.UnexpectedError.] [] []
    But it does exist, and the user can UNC to the path. Again, if the problem was system unable to access the path, I would expect many more (all) my other workstations generating the same error. I do see that the workstation has 2 IP addresses, a 172.16 address which would have access and a 192.168 address that wouldn't be able to. I also see:
    Code:
    The agent service is running, but the request failed for one or more known addresses.
    It's feasible that it's trying to access the path from 192.168 interface and failing, but shouldn't it try/know to use the 172.16 interface?

  • Full path and filename in wwv_flow_files after upload from UNC path in IE

    I have a page with a file browse item. After page submit I move the file from wwv_flow_files to another table.
    Normally the column wwv_flow_files.filename only contains the filename. However, when using IE9 and selecting a file from an UNC path the column contains the full path+filename.
    Does anybody have an idea what happens here?
    How can I make sure I only get the filename?
    Using Apex 4.02.007
    Edited by: Rene W. on Feb 28, 2013 6:39 AM

    Rene W. wrote:
    I have a page with a file browse item. After page submit I move the file from wwv_flow_files to another table.
    Normally the column wwv_flow_files.filename only contains the filename. However, when using IE9 and selecting a file from an UNC path the column contains the full path+filename.
    Does anybody have an idea what happens here?
    How can I make sure I only get the filename?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\"—and this monstrosity has sadly had to be enshrined in the HTML spec. A reasonably compatible way to strip the path in JS is provided there, or you should be able to do it fairly easily in PL/SQL when moving the file.
    The fact you are getting the full path suggests that the IE security config setting "Include local directory path when uploading files" (or IE9 equivalent) is used in your browser/environment to enable the path to be exposed in IE. This may be necessary to support dismal legacy applications. Consult whoever is responsible for browser security configuration at your site to see why/if this setting is necessary.

  • Acrobat Reader XI fail to open file from unc path "Access Denied"

    Hi,
    When we try to open a pdf file from an unc path by double-click on it there is an error message : "There was error opening this files. Access Denied"
    If we do "File -> Open" the file open correctly. Same if we copy the file localy.
    After looking around Internet and other thread Acrobat Reader X got the same problem but seemed to be resolved with an update.
    If we desable "Enable Protected Mode at startup" the file open correctly (it is not a solution).
    Does anyone have a solution to this problem ?
    OS : Windows XP SP3
    Acrobat Reader : 11.0.2
    Regards,

    I have also seen this occur with one user's computer.  Another user with similar privileges and software setup does not exhibit the same issue however.  Would love Adobe to investigate and address this issue.

  • Can't add own application to RemoteApps - "You must specify a file from the RD Session Host server SERVERNAME by using the UNC path....

    Hi, there
    I'm not really pro- at RDS in server 2012 (r1), but I have a problem and don't find anything suitable on internet:
    I'm trying to publish one of my own, unlisted programs to rdweb, but it keeps saying "You must specify a file from the RD Session Host server SERVERNAME by using the UNC path...."
    1) I provided the path in the unc name - when I click "Add.." then i browse the the .exe file via network share, not via local path. So that should be OK
    2) Firewall is turned off and eventhough the exeptions are enabled, both of then, checked
    What else should I do to make this work?

    Okej, I found the sollution:
    You have to specify the path like \\hostname\drive_letter$\path-to-the-program.
    I was doing wrong because i wrote it like \\hostname\ShareName\path-to-the-program.
    I was misleded because the wizard wants me to find the program by clicking, and not by entring the path manualy.

  • Unable to launch Litetouch.vbs (LiteTouch.wsf) from UNC path - A connection to the Deploayment Share Could not be made

    I am having a difficult time figuring out this issue. Here is the back story. The particular deployment share is not used in the traditional sense of deploying OS images. Instead, it is only used in deploying applications. I actually have three shares that
    do this catered to three different clientele groups; IT, teachers and students.
    I have these shares set up so that the Litetouch.vbs is used as a login script and tied to specific AD accounts. When launched, it goes through the normal MDT gathering process and eventually shows a list of applications to select to install.
    And this has and still is working perfectly for several years with both wired and wireless computers, until recently.
    My issue, I'm afraid, is with the new Intel Dual Band 7260 wireless cards/drivers (both N7260 and AC7260. The reason I suspect this is because any other desktop or laptop will launch the VBScript just fine and bring up the list of software like it has always
    done. However, if I UNC to the share and try to manually run LiteTouch.vbs, I get the "A connection to the deployment share cannot be made. Connection OK. Possible cause: Invalid credentials." That's right. I can UNC to the shares all day long, but
    when launching the LiteTouch.vbs or LiteTouch.wsf scripts, I always get the above error. So the wireless is working, in a way. Just not the way I need it to. I've tried different versions of drivers all with the same error. I've launched other VBScripts that
    I've wrote from UNC paths and they run fine.
    I am using a Domain Admin account to connect back to the deployment share through MDT. My account is a domain admin account. The share permissions are full control for Everyone and Domain Admins. The folder permissions are Read Only for Everyone and Full
    Control for Domain Admins. Like I stated, this works fine on any other system.
    When I look at the BDD.log file, sometimes I don't see anything, but most of the time I see the line "No physical adapters present. Cannot deploy over wireless." Which, in my case, is not true because I can use any other laptop with older
    Intel wireless cards, Broadcom, Atheros or whatever and it works perfectly. And, if I hardwire the offending laptops and use Ethernet instead of wireless, I can launch the VBScript and proceed just fine.
    I guess my question is, is there a way to force MDT to use any network connection, whether it's wired or wireless to deploy anything. In my case, it would be software.
    We use this option as a way for students in our high schools to be able to log in with a special account and install specific software they may need for a class. It is easier to have them do it this way than to try and install different software for
    different classes on a total of 4000 laptops.
    I am currently running Windows Server 2012 R2 with MDT 2013. The laptops are running Windows 7 SP1 x64 Enterprise and Windows 8.1.1 Enterprise.
    Any help or ideas anyone has to offer would be greatly appreciated.
    ~Mike

    I understand that you got MDT to work on other adapters, and I understand that some people dislike the AC series.
    However...
    I must strongly disagree with your conclusion:
    the Intel 7260 cards just will not work for this scenario. Any other wireless card works
    perfectly fine...
    As designed, MDT is coded to block Wireless deployment scenarios. However, the algorithm used to determine if a network adapter is wired vs wireless is highly flawed, it will check the description (caption) of the network adapter and search for the string:
    "Wireless". And if I recall, it is difficult to determine Wireless vs Wired within a VBSCript.
    Set colAdapters = objWMI.ExecQuery("select * from win32_NetworkAdapterconfiguration where IPEnabled = True")
    For Each oAdapter in colAdapters
    If Instr(UCase(oAdapter.Caption),"WIRELESS") = 0 Then
    If oAdapter.IPConnectionMetric < sIPConnectionMetric Or sIPConnectionMetric = "" Then
    sIPConnectionMetric = oAdapter.IPConnectionMetric
    End If
    End IF
    If Instr(UCase(oAdapter.Caption),"WIRELESS") Then
    sWirelessConnectionMetric = oAdapter.IPConnectionMetric
    End If
    Next
    If sIPConnectionMetric = "" Then
    oLogging.CreateEntry "No physical adapters present, cannot deploy over wireless", LogTypeError
    ValidatenetworkConnectivity = Failure
    Exit Function
    End IF
    On my Lenovo W530, for example, when I disable my Wired connection, my wireless adapter reports:
    PS C:\> gwmi -query "select * from win32_NetworkAdapterconfiguration where IPEnabled = true" | select-object Caption
    Caption
    [00000002] Intel(R) Centrino(R) Ultimate-N 6300 AGN
    AS you can see, no "Wireless" in the caption string.  A connection to the deployment share works just fine.
    Therefore...
    Yes, you *may* have gotten the installation to work on the machines that *just happen* to not have "wireless" in the caption, but I would not count on this to be true on all machines in a corporate environment.
    -k
    Keith Garner - Principal Consultant [owner] -
    http://DeploymentLive.com

  • Obtaining file name from the file path given

    hi,
    how to obtain  file name from the file path given

    Hi bharath,
    1. PC_SPLIT_COMPLETE_FILENAME
    2.
    DATA : path LIKE pcfile-path.
    DATA : extension(5) TYPE c.
    path = filename.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    * CHECK_DOS_FORMAT =
    IMPORTING
    * DRIVE =
    extension = extension
    name = name
    * NAME_WITH_EXT =
    * PATH =
    EXCEPTIONS
    invalid_drive = 1
    invalid_extension = 2
    invalid_name = 3
    invalid_path = 4
    OTHERS = 5
    regards,
    amit m.

  • Audit logs on Windows 2008 works different when file is modified from UNC path

    Hello All,
    Here i have a strange situation with the generation of audit logs when folders\files are changed locally(my computer) on the server (vs) from the UNC path
    (\\servername\drive$\folder\....).
    File Server : Windows 2008 R2.
    Audting enabled and SACL set on the folder level.
    Enabled advanced auditing for Audit Object Access and enabled the force sub category audit settings on vista \ window 2008 policy via GPO and also verified that the sub category is set.
    also set SACL on one folder on the R drive. (\\servername\r$\<folder>\<audited folder>
    auditpol /get /category:"Object Access"
    Object Access : File System                            
    Success and Failure
    Situation : 1
    When i make any manipulations (traversing \ listing \ adding or deleting folder or files) on the server locally from my computer ---> . r drive --> folder --> audited folder , i get the event id generated (4663) with all the correct
    information.
    For ex: created a new txt file.
    Object: Object Server: Security, Object Type: File, Object Name: R:\Audits1\folder1\New Text Document.txt, Handle ID: 0xcb4
    Process Information: Process ID: 0x1bac , Process Name: C:\Windows\explorer.exe
    Access Request Information: Accesses: WriteData (or AddFile) AppendData (or AddSubdirectory or CreatePipeInstance) , Access Mask: 0x6
    Situation : 2
    When i make the same  manipulations (traversing \ listing \ adding or deleting folder or files) on the server or remotely via the UNC path \\servername\r$\folder\audited folder or DFS share or \\servername\<sharename>
    , i dont get the event id generated (4663) with the needed information.
    For ex: created a new txt file.
    Object: Object Server:      
    Security , Object Type:File ,         
    Object Name:         
    R:\Audits1\folder1\New Rich Text Document (3).rtf , Handle ID:  
    0xa3c
    Process Information: Process ID: 0x4, Process Name:
    Access Request Information: 
    Accesses: WriteData(or addfile), Access Mask: 0x100
    In the second situation process name is empty (for the file events) and also found that the logs generated are very less compared to the first situation.
    Please suggest if there is any fix with this.
    Thanks,

    Enable the following auditing on the server either through domain
    policy or local policy:
    Audit logon events - Success
    Audit Object Access  - Success
    On the Auditing tab, add Everyone with the following audit settings.

Maybe you are looking for

  • "CoreServicesUIAgent.app" would like to access your calendar. What do I do with THAT?

    This morning I see a pop-up that says, "CoreServicesUIAgent.app" would like to access your calendar" with choices of "Don't Allow" or "OK." I have no idea how to choose since I don't know what that is and where it came from. Now I feel forced to leav

  • Goods Return for Capital Goods

    Dear Experts, I need correct SAP Process for the below scenario : GRPO for Capital goods has been raised. Incoming excise Invoice for the GRPO has been booked. While booking Incoming excise invoice, 50% of the Excise duties will be posted to Capital

  • Updating bseg and bsis table ...

    Hello, I want to update bseg and bsis table. I guess i will have to use BAPI_ACC_DOCUMENT_POST. how do i go on using this BAPI ? any starter code snippet ...!!

  • Practical use of java.lang.Error

    Hi All, I would like to know if we can use java.lang.Error -- the sibling of java.lang.Exception -- in our programme. If yes, how and for what practical purposes and if no, then what is the use of this class? Thanks, Abbas

  • Colorsync profile list empty

    I have .icc profiles in both my user and system ColorSync Profile folders and when I try to select a profile from within an application, my ColorSync Profile list is empty. Anyone have any ideas?