Search found 378 matches
- 06 Apr 2012 07:48
- Forum: DOS Batch Forum
- Topic: BATCH rename files using a criterion txt file?
- Replies: 18
- Views: 14709
Re: BATCH rename files using a criterion txt file?
@echo off &setlocal enableextensions set /a cnt=0 for /f "delims=" %%a in ('dir /b /on *.txt') do call :ren "%%a" goto :eof :ren for /f "tokens=1" %%b in ('more +%cnt% log.log') do ( echo ren %1 "%%b.txt" set /a cnt+=1 &goto :eof )
- 01 Apr 2012 04:37
- Forum: DOS Batch Forum
- Topic: A clever way to embed a entir text file within a batch file?
- Replies: 10
- Views: 14379
Re: A clever way to embed a entir text file within a batch f
Speed Writing a File viewtopic.php?p=11845
- 31 Mar 2012 08:18
- Forum: DOS Batch Forum
- Topic: tabulators
- Replies: 23
- Views: 17496
Re: tabulators
8 not expected
Code: Select all
SET /A remainder=(40-strlen) %% 8
- 30 Mar 2012 10:51
- Forum: DOS Batch Forum
- Topic: tabulators
- Replies: 23
- Views: 17496
Re: tabulators
And I inattentivedoscode wrote:This part of job is too hard for me
dbenham wrote::: Aborts with an error message to stderr and errorlevel 1 if IntVal
:: corresponds to one of the following problematic characters:
so text editor is single way
- 30 Mar 2012 10:29
- Forum: DOS Batch Forum
- Topic: tabulators
- Replies: 23
- Views: 17496
Re: tabulators
2)
"for/f" loop w/o "delims" uses tab & spase as delimiters. Use it.
or use right text editor again
"for/f" loop w/o "delims" uses tab & spase as delimiters. Use it.
or use right text editor again
Code: Select all
set "Tab= "
for /f "tokens=1,2* delims=%Tab%" %%a in (file.txt) do echo %%a%Tab%%%b
- 30 Mar 2012 10:20
- Forum: DOS Batch Forum
- Topic: tabulators
- Replies: 23
- Views: 17496
Re: tabulators
1)
or simple use right text editor
http://www.dostips.com/forum/viewtopic.php?f=3&t=1733 wrote::: 9 0x09 011 TAB (horizontal tab)
or simple use right text editor
Code: Select all
set "Tab= "
echo Cplumn1%Tab%column2 > file.txt
- 28 Mar 2012 11:20
- Forum: DOS Batch Forum
- Topic: Split string to characters
- Replies: 32
- Views: 44153
Re: Split string to characters
Words from a phrase into Variables viewtopic.php?p=9814#p9814
- 28 Mar 2012 11:14
- Forum: DOS Batch Forum
- Topic: [Question] Echoing Veriables in Veriable..
- Replies: 11
- Views: 7949
Re: [Question] Echoing Veriables in Veriable..
foxidrive wrote:Code: Select all
@echo off
set SRC=1
set SR%SRC%=12
echo %SR1%
call echo %%SR%SRC%%%
pause
or
Code: Select all
@echo off
setlocal enabledelayedexpansion
set SRC=1
set SR%SRC%=12
echo %SR1%
echo !SR%SRC%!
pause
- 26 Mar 2012 07:14
- Forum: DOS Batch Forum
- Topic: Variable manipulation
- Replies: 3
- Views: 3665
Re: Variable manipulation
w/o DelayedExpansion
Code: Select all
call set var1=%%var1:%var2%=%%
- 24 Mar 2012 11:14
- Forum: DOS Batch Forum
- Topic: How to check if 3 files exist,and them delete'em
- Replies: 1
- Views: 2478
Re: How to check if 3 files exist,and them delete'em
Code: Select all
if exist "name1" if exist "name2" if exist "name3" (del "name1" "name2" "name3" &echo s > file.txt)
- 24 Mar 2012 01:05
- Forum: DOS Batch Forum
- Topic: search for list of filenames in a single file
- Replies: 10
- Views: 9342
Re: search for list of filenames in a single file
it's no regexps
- 23 Mar 2012 13:14
- Forum: DOS Batch Forum
- Topic: search for list of filenames in a single file
- Replies: 10
- Views: 9342
- 20 Mar 2012 12:21
- Forum: DOS Batch Forum
- Topic: add "echo" comand at the begining of every line [solved]
- Replies: 5
- Views: 4502
Re: add "echo" comand at the begining of every line
image.txt, img.cmd & image.txt.cmd
http://multi-up.com/671639
http://multi-up.com/671639
- 20 Mar 2012 12:00
- Forum: DOS Batch Forum
- Topic: add "echo" comand at the begining of every line [solved]
- Replies: 5
- Views: 4502
Re: add "echo" comand at the begining of every line
Code: Select all
set "img=image.txt"
>%img%.cmd (
echo:@echo off
for /f "delims=" %%a in (%img%) do @echo:echo:%%a
echo:pause^>nul
)
- 12 Mar 2012 11:19
- Forum: DOS Batch Forum
- Topic: Batch code to paste from clipboard to a file?
- Replies: 9
- Views: 21985