Search found 378 matches
- 31 Oct 2011 12:43
- Forum: DOS Batch Forum
- Topic: Increase counter written inside bat file every time it runs
- Replies: 3
- Views: 3724
Re: Increase counter written inside bat file every time it r
output is "part04 %PictureNumber%.png" ? set "PictureNumber=001" for /f "tokens=2 delims=. " %%a in ('dir /b/o-n "part04 *.png"') do (set /a PictureNumber=1%%a+1 &goto:next) :next nconvert -overwrite -out png "part04 %PictureNumber:~-3%.bmp"
- 25 Oct 2011 00:38
- Forum: DOS Batch Forum
- Topic: How to stop delayedexpansion from changing "free text"
- Replies: 14
- Views: 9339
Re: How to stop delayedexpansion from changing "free text"
IMHO simplest solution is CALL @ECHO OFF setlocal &rem enabledelayedexpansion SET FILE=TESTx.CSV IF EXIST %FILE% DEL %FILE% IF EXIST _%FILE% DEL _%FILE% SET N=200 for /f "tokens=1* delims=," %%d in ('type ~%FILE%') do call :process "%%d" "%%e" FC ~%FILE% _%FILE% PAU...
- 24 Oct 2011 04:58
- Forum: DOS Batch Forum
- Topic: Dos Command/Batch file to find a folder path & file size
- Replies: 8
- Views: 16110
Re: Dos Command/Batch file to find a folder path & file size
@echo off &setlocal set "dir=D:" for /d %%d in ("%dir%\*") do call :size "%%d" pause goto :eof :size setlocal enabledelayedexpansion set /a all=size=0 for /f "tokens=1-3" %%x in ('dir /s/-c %1 2^>nul ^|findstr /c:"File(s)"') do ( if "!all!&...
- 14 Oct 2011 00:18
- Forum: DOS Batch Forum
- Topic: Colon Philosophy
- Replies: 17
- Views: 15649
Re: Colon Philosophy
until you do not use an editor with code coloring(is the same as) goto :a
- 12 Oct 2011 07:33
- Forum: DOS Batch Forum
- Topic: Help with batch code- need help!
- Replies: 2
- Views: 3479
Re: Help with batch code- need help!
what is %dir%\test\%user%\%userconfig.txt ?
- 11 Oct 2011 08:36
- Forum: DOS Batch Forum
- Topic: Help with mkdir
- Replies: 3
- Views: 3660
Re: Help with mkdir
Code: Select all
if /i "%config%" == "Y" (md %var%:\%var2%\%user%) else goto :dir
works fine and makes both dirs
- 10 Oct 2011 06:11
- Forum: DOS Batch Forum
- Topic: Request for bat file
- Replies: 4
- Views: 3916
Re: Request for bat file
errrm could you exclude the .bat file? I don't want it to have a random number in front... To make thing easier you can exclude all *.bat files... Changed One more thing... If it's not too much of a trouble could you reverse the job? A script that would remove random numbers? @echo off for /f "...
- 10 Oct 2011 04:01
- Forum: DOS Batch Forum
- Topic: Request for bat file
- Replies: 4
- Views: 3916
Re: Request for bat file
batch one too?all files in the local directory (directory where the batch file is located)
Code: Select all
for /f "delims=" %%f in ('dir /b/s/a-d ^|findstr /eiv /c:.bat /c:.cmd') do call ren "%%f" "%%random%%_%%~nxf"
- 09 Oct 2011 01:18
- Forum: DOS Batch Forum
- Topic: Write something down in a .txt
- Replies: 2
- Views: 2697
Re: Write something down in a .txt
Code: Select all
[command] >> [file]
use >> for add
and > for rewrite
Code: Select all
[command] > [file]
- 09 Oct 2011 00:59
- Forum: DOS Batch Forum
- Topic: Opening and working in
- Replies: 4
- Views: 3827
Re: Opening and working in
[Question] Opening Batch files in a new window with cmd
and the command similarly
start %ComSpec% /c command /parameter /parameter too
and the command similarly
start %ComSpec% /c command /parameter /parameter too
- 01 Oct 2011 13:51
- Forum: DOS Batch Forum
- Topic: I need help with this code!!
- Replies: 4
- Views: 4345
Re: I need help with this code!!
BatMaster, just erase red symbols
call echo var %%%%_%n1%%%%% = %%_%n1%%%
call echo var %%%%_%n2%a%%%% = %%_%n2%a%%
call echo var %%%%_%n1%%%%% = %%_%n1%%%
call echo var %%%%_%n2%a%%%% = %%_%n2%a%%
- 01 Oct 2011 11:43
- Forum: DOS Batch Forum
- Topic: I need help with this code!!
- Replies: 4
- Views: 4345
Re: I need help with this code!!
@echo off set /a n1=%random% %% 10 +1 set /a n2=%random% %% 10 +1 <file1.txt ( set /p _1= set /p _2= set /p _3= set /p _4= set /p _5= set /p _6= set /p _7= set /p _8= set /p _9= set /p _10= ) <file2.txt ( set /p _1a= set /p _2a= set /p _3a= set /p _4a= set /p _5a= set /p _6a= set /p _7a= set /p _8a...
- 20 Sep 2011 12:07
- Forum: DOS Batch Forum
- Topic: [Question] Can I use "And" whene comparing strings with "If"
- Replies: 3
- Views: 3672
Re: [Question] Can I use "And" whene comparing strings with
AND it's easy
Code: Select all
if 1==1 if 2==2 if 3==3 echo true
- 18 Sep 2011 14:30
- Forum: DOS Batch Forum
- Topic: [Question] Opening Batch files in a new window with cmd
- Replies: 6
- Views: 5213
Re: [Question] Opening Batch files in a new window with cmd
Code: Select all
start batch2.cmd
New window will not close after batch2.cmd end
- 18 Sep 2011 13:27
- Forum: DOS Batch Forum
- Topic: [Question] Opening Batch files in a new window with cmd
- Replies: 6
- Views: 5213
Re: [Question] Opening Batch files in a new window with cmd
Code: Select all
start %ComSpec% /c "batch_2.cmd"