Home Forums SQL Server 2005 T-SQL (SS2K5) Scripting help - Need a query to find filenames and filepaths under a certain directory RE: Scripting help - Need a query to find filenames and filepaths under a certain directory

  • tan110 (10/23/2009)


    Scripting help - Need a query to find filenames and filepaths under a certain directory.

    I need the results to be something like this:

    filepath filename

    c:\program files\blah\blah helpme.txt

    c:\program files\blah

    not enough information.

    do you have a table with both file and filepath? do you want to use something like xp_cmdshell to search the servers harddrive? what have you tried so far?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!