Previous Next

Thread: Question - need to see if this will do what I need

Last post 07-31-2008 3:12 AM by yellowdog.dave. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 07-30-2008, 12:15 PM

    Question - need to see if this will do what I need

    Ok - not sure if this will or can do what I need - my need is very basic - so if anyone can help me it would be great.

    Here's my problem - years ago we use to use a dos command to get the file directory of a back-up disk - then I would put it into a database:

    example - Disk 1

                    disk          file name       size   date   time  

    then I would copy it into a database.

    My problem is we don't remember how to do it and now I have alot the files/folders are on a removeable drive and I want to get the general info (like above) to put in a database.

    I know this is probably very easy - but could someone help?

     

    Thanks

    April

  • 07-30-2008, 1:50 PM In reply to

    Re: Question - need to see if this will do what I need

    That's not a function of LogParser, but it's quite possible in everything from a batch file to PowerShell.  Check scripting resources and Google/Live Search to find a solution.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 07-31-2008, 3:12 AM In reply to

    • yellowdog.dave
    • Top 50 Contributor
    • Joined on 07-18-2008, 3:17 AM
    • Johannesburg, South Africa
    • Posts 66

    Re: Question - need to see if this will do what I need

    Hi April, 

    This is very simple to achieve using logparser and I think it is the perfect tool for something like this.

    You use the Filesystem (FS) input format to get the information you want and you pump it directly into the database you want using the SQL output format. No intermediate steps required.

    You would need to decide what date and time and other fields you want, as you get Create, Access and Write. What you might want to do is simply take all the information as it can prove useful.

    When you do this for the first time, you can use the additional parameter to the SQL output of -createtable:ON and thereafter just append to the table. You can use any ODBC compliant datasource, in my example, I use M$ Access.

    LogParser "SELECT * INTO MyTable FROM C:\*.*" -i:FS -o:SQL -oConnString:"Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\MyDB\MyDB.mdb" -createtable:ON

    Refer to the logparser.chm for the syntax and some examples. Hope this helps. 

    Cheers, Dave 

    Yes, dear
Page 1 of 1 (3 items)
Page view counter