mapping path of a file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SunshineInTheRain
    New Member
    • Jan 2008
    • 14

    #1

    mapping path of a file

    Hi all,

    I am using "master..xp_get filedetails @path" method to get file details.

    I am not sure, maybe the @path must in this format "C:\TestFolder\ SubFolder\TestF ile.pdf" only can work, because i get error of "xp_getfiledeta ils() returned error 3, 'The system cannot find the path specified.'".

    So if it is true, the @path i have now is in this format : "../../../../../TestFolder/SubFolder/TestFile.pdf".

    Anyone could tell is there any way i can map the path including which drive the file is located?

    Urgent. Any help much appreciated. Thanks.
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    SQL extended stored proc have default folders. Executing a xp_cmdshell 'dir' will tell you that it's not on the root folder. So doing a "../../" might not work for you. You might need to specify the actual path.


    -- CK

    Comment

    • SunshineInTheRain
      New Member
      • Jan 2008
      • 14

      #3
      Appreciating your reply.

      That mean there has no way to do like server.mappath in asp.net? which we know only the file name, then get the path from mappath.

      Comment

      Working...