Search found 230 matches

by darioit
02 Feb 2024 03:15
Forum: DOS Batch Forum
Topic: Extract missing record
Replies: 6
Views: 12152

Re: Extract missing record

Thank you Antonio, it works fine, but the problem is a pdf directory is a windows share slow and takes long time to read 1 milion of pdf, so I prefer before do a dir /b > file.txt and work on a file.txt
by darioit
01 Feb 2024 14:15
Forum: DOS Batch Forum
Topic: Extract missing record
Replies: 6
Views: 12152

Re: Extract missing record

yes you are right, the problem is that with millions of records it takes too long, so I decided to do a dir of the directory first. I'll try to work on it and post the solution, see if I can solve the problem
by darioit
01 Feb 2024 11:05
Forum: DOS Batch Forum
Topic: Extract missing record
Replies: 6
Views: 12152

Extract missing record

Hello, I need your help to extract missing row, this is the statement: In a large ordered list of record I have always a couple of record with variable lenght like this example when the second record must have same name like xx_xx_xx and fix X1 after last underscore FILEA_FILEB_FILEC.PDF FILEA_FILEB...
by darioit
25 Oct 2022 23:33
Forum: DOS Batch Forum
Topic: Compare two directory
Replies: 2
Views: 3431

Re: Compare two directory

Perfect, works fine and very fast, I don't considered using token with delims _ in my script!

Many thanks
Dario
by darioit
25 Oct 2022 11:16
Forum: DOS Batch Forum
Topic: Compare two directory
Replies: 2
Views: 3431

Compare two directory

Hello, could you help me to batch compare a directory to find missing couple of file? Example existing couple, same name "AB12345_DEF1234_20220105" and 2nd file has another qualifier "_XYZ1234567" C:\Data\AB12345_DEF1234_20220105.pdf C:\Data\AB12345_DEF1234_20220105_XYZ1234567.pdf example missing bo...
by darioit
31 Jan 2022 07:02
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 20453

Re: search for previous item

I made a little improvement returning a full row find @echo off set "file=report.txt" set "search=%1" findstr.exe /n /I /C:"#" /I /C:"%search%" "%file%" | sort.exe /r /o temp1.txt for /f "usebackq tokens=1 delims=:" %%I in (`findstr.exe /n /i /c:"%search%" temp1.txt`) do call :GetArchive %%I del tem...
by darioit
31 Jan 2022 04:45
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 20453

Re: search for previous item

Eureka! works fast and it's perfect for my purpose, thanks as always to all :D :D :D
by darioit
29 Jan 2022 14:34
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 20453

Re: search for previous item

good job, but if I need to search only a parts such "19004"?

thank you in advance
by darioit
29 Jan 2022 12:26
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 20453

Re: search for previous item

this is exactly real word 2015-01-03 22:31 4490416 4490416 d:\zipfile1.7z # Archivio d:\zipfile1.7z 2015-01-01 22:51 56091 56369 file1.pdf 2015-01-01 22:51 14975 14479 file2.pdf # Fine dell'archivio 2015-01-03 22:31 4490416 4490416 d:\zipfile2.7z # Archivio d:\zipfile2.7z 2015-01-02 23:21 14576321 1...
by darioit
29 Jan 2022 12:23
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 20453

Re: search for previous item

sorry you right works, in my example works fine, but I try in real word and it doesn't work
by darioit
29 Jan 2022 11:59
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 20453

Re: search for previous item

Many thanks Steffen, I modify first search "findstr /nec:" in "findstr /nc:" to search also a part of document
Just a little problem, if document is present in more zip file works only for last record find

@Squashman slowly but can't find a zip match, sorry

Regards
by darioit
29 Jan 2022 02:20
Forum: DOS Batch Forum
Topic: search for previous item
Replies: 19
Views: 20453

search for previous item

Hello I got this problem: a very huge txt list of content of zip file created using winrar file: filearchive.txt contain: #Archivio E:\pippo.zip 2021-01-01 01:01 12345 doc1.pdf 2021-01-02 01:02 23451 doc2.pdf #Archivio E:\pluto.zip 2021-01-03 01:01 34556 doc3.pdf 2021-01-04 01:02 78123 doc4.pdf etc....
by darioit
24 Sep 2021 23:27
Forum: DOS Batch Forum
Topic: Compare two lists of elements, remove same and recycle for next run
Replies: 6
Views: 7252

Re: Compare two lists of elements, remove same and recycle for next run

ok thank you now is better? @echo on setlocal EnableDelayedExpansion type nul >> "Recycle_%1" type nul >> "Recycle_%2" if exist "%1" type "%1" >> "Recycle_%1" sort.exe -u "Recycle_%1" > "%1" && del /q "Recycle_%1" if exist "%2" type "%2" >> "Recycle_%2" sort.exe -u "Recycle_%2" > "%2" && del /q "Rec...
by darioit
22 Sep 2021 22:41
Forum: DOS Batch Forum
Topic: Compare two lists of elements, remove same and recycle for next run
Replies: 6
Views: 7252

Re: Compare two lists of elements, remove same and recycle for next run

Of course I really appreciate any bug fix or improvement, I chose to use this approach because the input file or the recycle file can be empty, and using other methods the comparison always failed, and also Recycle file must be always present at the end of program