hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

Full Version: Once Is Enough V4
starsky32
hi again. wink.gif

Here's a small and very simple win32 gui tool to remove duplicates lines from a text file.
Features : use ref list / sort list by frequency / Alphabetize
Exe size : 29 184 bytes

Starsky32.



flame
i just use a .bat file, "the simpler the safer" (nicholas cage in his new movie, matchstick men)

here ya go :
CODE
@echo off
setlocal
if {%1} EQU {} goto syntax
if not exist %1 goto syntax
set file=%1
set file="%file:"=%"
set work=%~pd1\%~nx1.tmp
set work="%work:"=%"
set work=%work:\\=\%
sort %file% /O %work%
del /f /q %file%
for /f "Tokens=1* Delims=:" %%s in ('findstr /n /v /c:"dO nOt FiNd" %work%') do set record=###%%t###&call :output
REM if exist %work% del /q %work%
endlocal
goto :EOF
:syntax
@echo ***************************
@echo Syntax: SortDup Input_File
@echo ***************************
goto :EOF
:output
if not defined prev_rec goto :write
if "%record%" EQU "%prev_rec%" goto :EOF
:write
set prev_rec=%record%
set record=%record:###=%
if "%record%" EQU "" goto :blknul
if "%record%" GTR " " @echo>>%file% %record%&goto :EOF
:blknul
if defined bn_rec goto :EOF
set bn_rec=Y
@echo.>>%file%
PSR
thx for this nice tool, really useful, also the batch file is workin fine rolleyes.gif
ComSec
thanks for both files.... biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.