Sign in to follow this  
Followers 0
Zedna

LstDump - DiskDir LST Dumper (for Far Manager)

1 post in this topic

#1 ·  Posted (edited)

Total Commander manager have DiskDir plugin which can create LST files with list of files (catalog).

There is also better plugin DiskDirExtended which is compatible but also lists contents of archive files.

http://www.totalcmd.net/plugring/diskdir_extended.html

http://www.ghisler.com/plugins.htm --> DiskDir

In Far Manager there can be these LST files treated as archives with help of my LstDump utility.

http://www.farmanager.com/

To enable browsing in LST in the FAR panels include content of "custom.ini(lst).add"

file to the "c:\program files\far\plugins\multiarc\formats\custom.ini" file having removed any older [LST] section from there,

then place LSTDUMP.EXE in any directory from the %PATH% variable and reload the FAR

Files in archive LstDump.zip:

custom.ini(lst).add
Example.lst
Example.out
LstDump.au3

There is also compiled version LstDump.exe -> LstDump_exe.zip

LstDump.au3

#AutoIt3Wrapper_Res_Language=1029
#AutoIt3Wrapper_Res_Description=DiskDir LST Dumper
#AutoIt3Wrapper_Res_Comment=Designed for Far managers MultiArc plugin
#AutoIt3Wrapper_Res_FileVersion=1.0
#AutoIt3Wrapper_Res_LegalCopyright=Copyright © 2011 Petr Zednik
://////=__=<.=@volny.cz>
://////=__=
#AutoIt3Wrapper_Change2CUI=y
#AutoIt3Wrapper_UseX64=n
#NoTrayIcon

Global $user32 = DllOpen('user32.dll')

$title = _
    'DiskDir LST Dumper 1.0' & @CRLF & _
    'Copyright (C) 2011 Petr Zednik <petr.zednik@volny.cz>' & @CRLF & _
    'This software is freeware'

; as parameter is expected LST file
If $CmdLine[0] > 0 Then
    ListEntries($CmdLine[1])
Else
    Output($title)
    Output('USAGE: LstDump <lst_file>')
    Output('Example: LstDump test.lst')
EndIf

DllClose($user32)
Exit

Func ListEntries($lst_file)
    Local $dir

    Output($title)
    Output('Listing entries...')
    Output('---')

    $text = FileRead($lst_file)
    $text = StringSplit($text, @CRLF, 1)
    $count = 0

    For $i = 2 To $text[0] ; skip first line
        $line = $text[$i]
        If $line = '' Then ContinueLoop

        $line = StringSplit($line, @TAB) ; $name & @TAB & $size & @TAB & $date & @TAB & $time

        If StringRight($line[1],1) = '\' Then
            $name = $line[1]
            $dir = $name
        Else
            $name = $dir & $line[1]
        EndIf

        Output($name & @TAB & $line[2] & @TAB & $line[3] & @TAB & $line[4])

        $count += 1
    Next

    Output('---')
    Output('Total objects: ' & $count)
EndFunc

Func Output($text)
    ConsoleWrite(Ansi2Oem($text) & @CRLF)
EndFunc

Func Ansi2Oem($text)
    $text = DllCall($user32,'Int','CharToOem','str',$text,'str','')
    Return $text[2]
EndFunc

I use LST files for catalogizing of external media/other computers/directories for later quick searching/comparing.

LstDump.zip

LstDump_exe.zip

Edited by Zedna

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0