REM ****** Searching exist folder, increase when founded/not *******
@echo off
setlocal enabledelayedexpansion
set /a count=0
for /f “tokens=*” %%a in (‘dir /b /od *.^|findstr “^foldername“‘) do (
set /a count+=1
)
set /a count+=1
MKDIR foldername!count!
July 15, 2011
How to Automate create folder with increase number CMD
July 11, 2011
Remark on echo to execute pl/sql oracle
If you want to remark your oracle script don't do this ( rem echo @script1; echo @script2; echo exit; )| cmd /r d:\oracle\product\10.2.0\db_1\bin\sqlplus.exe -L -S scott/tiger but Do this ( echo --@script1; echo @script2; echo exit; )| cmd /r d:\oracle\product\10.2.0\db_1\bin\sqlplus.exe -L -S scott/tiger
June 27, 2011
CMD FOR /F
Difference between
for /F “eol= tokens=1* delims= “
and
for /F “eol= tokens=* delims=\ “
the first one only take the sentence until found space, the second one taken all the sentence until EOF
June 14, 2011
How to remove con and Nul.protected directory
How to Create folder con and Nul.protected (more…)
June 12, 2011
How to display | > < ^ on dos command
Menampilkan | atau > atau < atau ^ pada dos command adalah memakai perintah ^ sebelum karakter-karakter tersebut
Khusus untuk menampilkan karakter % maka memakai perintah % sebelum karakter tersebut
Contoh pemakaian ^ :
ECHO Test ^| karakter ^> dan ^< atau ^^
Contoh pemakaian % :
Buat file nama.bat isinya adalah
@ECHO Halo nama saya %1 dan ^%1 serta %%1
Jalankan nama sikathabis
Maka hasilnya adalah nama saya sikathabis dan sikathabis serta %1
