extended stored procedure

  • Hello,

    I have share folder: "Share_Folder". 

    How could I find on which drive this folder is placed (C:, or D:, or ...).

    Is there any extended stored procedure with this purpose, or is there some other way to get that information.

  • Hi

    Assuming you can start xp_cmdshell, try this:

    xp_cmdshell 'net share'

    JP

  • great, that's it.

    How to get drive name if folder is not shared ?

  • Get the LEFT( @Path , 1) maybe?

  • I asked 'if the folder is not shared', and I have only the name of folder (not full path)

  • Yes, and I answered to that. Ex: LEFT( @Path , 1) on 'C:\Windows\System' gives 'C'.

    And if you only have the name of the folder you have to search for it on your drives. How are you supposed to find it otherwise?

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply