Search found 3 matches

by dosbenx
19 Apr 2013 04:25
Forum: DOS Batch Forum
Topic: Pb with variables ans loops
Replies: 7
Views: 6554

Re: Pb with variables ans loops

Hello, It's working with : @echo off (for /f "delims=" %%i in ('dir /b /a-d "l:\mail\4*.txt"') do ( @for /f "delims=" %%j in ('type "l:\mail\%%~i"') do ( @echo(%%~ni;%%j )))>c:\backup.log Thanks you very much for your quick accurate answers ! (2 days ago I did...
by dosbenx
18 Apr 2013 10:20
Forum: DOS Batch Forum
Topic: Pb with variables ans loops
Replies: 7
Views: 6554

Re: Pb with variables ans loops

Thanks for your quick answer I have put the line in a script and it works nearly : echo > c:\backup.log for /f "delims=" %%i in ('dir /b /a-d l:\mail\4*.txt') do ( @for /f "delims=" %%j in ('type "l:\mail\%%~i"') do ( @echo( %%~i:~-4; %%j) >> c:\backup.log )) I do not m...
by dosbenx
18 Apr 2013 06:55
Forum: DOS Batch Forum
Topic: Pb with variables ans loops
Replies: 7
Views: 6554

Pb with variables ans loops

Hello, I have txt files in a one folder : file1.txt file2.txt file3.txt ... each file has just one line that I want to save in 'backup.log' . I want to save also the name of each files. So I will have somthing like that in 'backup.log' : file1;the-line-of-file1 file2;the-line-of-file2 file3;the-line...