batch etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
batch etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

20 Kasım 2017 Pazartesi

Batch - Değişkenler ile Replace

@echo off
setlocal enabledelayedexpansion
set string=Uzun bir cumle
set find=Uzun
set replace=Kisa
call set string=%%string:!find!=!replace!%%
echo %string%

Output = Kisa bir cumle

Batch - String'den silme

@echo off
set string=Uzun bir cumle
set string=%string:Uzun=%
echo %string%

Output = bir cumle

Batch - Dosya ismindeki uzantıyı silmek

@echo off
    for /R "C:\Path" %%f in (*.txt) do (
    echo %%~nf
)
pause

13 Kasım 2017 Pazartesi

set a=5
set /a c=%a%*16

10 Kasım 2017 Cuma

Batch - Komut satırı argümanlarını kullanmak

echo off

set arg1=%1
set arg2=%2

echo arguman1: %arg1%
echo arguman2: %arg2%

Batch - Replace

@echo off
set string=This is my string.
set string=%string:my=your%
echo %string%