Search found 207 matches

by darioit
17 Apr 2019 04:47
Forum: DOS Batch Forum
Topic: Skip n. line before match pattern
Replies: 1
Views: 451

Re: Skip n. line before match pattern

Solved put each row in a temp file and when match row print temp file
by darioit
16 Apr 2019 09:21
Forum: DOS Batch Forum
Topic: Skip n. line before match pattern
Replies: 1
Views: 451

Skip n. line before match pattern

Hello folks, here another problem, I had to read text file and print it, but when I match a string starting tag AB3 for example year "2019" I want to skip raw (unknow) find and raw until prev tag AB3, after continue to read file with same method ex. AB1 data AB2 data AB3 2017 AB1 data AB3 2018 AB1 d...
by darioit
03 May 2018 02:23
Forum: DOS Batch Forum
Topic: get only last file of same type
Replies: 8
Views: 1834

Re: get only last file of same type

you're right, I miss it !!
Thank you
by darioit
02 May 2018 05:46
Forum: DOS Batch Forum
Topic: get only last file of same type
Replies: 8
Views: 1834

Re: get only last file of same type

Just a quick question, what's is this

Code: Select all

^>^>"%string%" 


it type file content on screen not in a file destination
by darioit
01 May 2018 23:38
Forum: DOS Batch Forum
Topic: get only last file of same type
Replies: 8
Views: 1834

Re: get only last file of same type

this is exactly what I had in mind, put each data in a array to get last file and, after read the array and delete or keep data,many thanks it works very very well !!
by darioit
30 Apr 2018 12:14
Forum: DOS Batch Forum
Topic: get only last file of same type
Replies: 8
Views: 1834

Re: get only last file of same type

Yes at 99,99% the last 5 digit are sequential and higher is last file received, maybe is easier find the last file using this value
by darioit
30 Apr 2018 08:41
Forum: DOS Batch Forum
Topic: get only last file of same type
Replies: 8
Views: 1834

Re: get only last file of same type

I wrote this code, but works only if a file are ordered before first dot. How can I order first qualifier name before dot (EEEEEEEE)? @echo off setlocal EnabledelayedExpansion set file1="" set file2="" for /f "tokens=1,2,3,4 delims=." %%a in ('dir *.DDDDDDDD.* /b/a-d/o-d') do ( set file1=%%a.%%b.%%c...
by darioit
27 Apr 2018 04:08
Forum: DOS Batch Forum
Topic: get only last file of same type
Replies: 8
Views: 1834

get only last file of same type

Hello everybody, a new problem at least difficult for me In a directory I have different file, I must add each one for same name at 3th position in a new file one and delete it after copy. This is a script and it works fine for /F %%a in ('dir %folder%\*.DDDDDDDD.* /b/a-d/od') do type "%folder%\%%a"...
by darioit
17 Mar 2018 03:47
Forum: DOS Batch Forum
Topic: Clean text
Replies: 11
Views: 2204

Re: Clean text

another hint, filter is enough on dots ....
thank you
by darioit
17 Mar 2018 01:44
Forum: DOS Batch Forum
Topic: Clean text
Replies: 11
Views: 2204

Re: Clean text

I try solution from aGerman and works fine except first raw that always is: 2017-01-17 10:50:41 ..... 160045 1485635 aa_bb_cc_dd.pdf where 1485635 show size compressed archive we could parse name starting from "pdf" word, that's a constant, so we get name backwards when find a space or backslashes T...
by darioit
17 Mar 2018 00:22
Forum: DOS Batch Forum
Topic: Clean text
Replies: 11
Views: 2204

Re: Clean text

sorry it's not a dir command, but "7za l file.zip"

I'll check your solution thank you for help!
by darioit
16 Mar 2018 04:00
Forum: DOS Batch Forum
Topic: Clean text
Replies: 11
Views: 2204

Re: Clean text

maybe this could works, it's just a regular expression!

Code: Select all

(?:[^ ]+ ){4}(?:.*\\)?(.*)
by darioit
16 Mar 2018 02:13
Forum: DOS Batch Forum
Topic: Clean text
Replies: 11
Views: 2204

Clean text

Hello,
which is the best way to clean this text from:

2016-04-09 13:16:45 ....A 105907 aa_bb_cc_dd.pdf
2016-04-09 13:16:45 ....A 105907 directory\ee_ff_gg_h.pdf

to:
aa_bb_cc_dd.pdf
ee_ff_gg_h.pdf

Thank you in advance
by darioit
01 Aug 2017 09:06
Forum: DOS Batch Forum
Topic: Remove single quote to pass param
Replies: 8
Views: 1805

Re: Remove single quote to pass param

I choose this one because I need to expand %1 variable in :sub script

Code: Select all

set File=%~1
set File=%File:'=%
call :sub %File%
goto:eof
:sub
by darioit
01 Aug 2017 06:30
Forum: DOS Batch Forum
Topic: Remove single quote to pass param
Replies: 8
Views: 1805

Re: Remove single quote to pass param

yes works, but can I expand "%param1%"

such this echo %~nx1