Oracle, Web, Script, SQLserver, Tips & Trick

July 15, 2011

How to Automate create folder with increase number CMD

Filed under: dos — sikathabis @ 11:40 pm
Tags:

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 11, 2011

Remark on echo to execute pl/sql oracle

Filed under: dos,oracle,windows — sikathabis @ 8:32 am
Tags: , ,
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

Filed under: dos — sikathabis @ 7:10 pm
Tags:

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

Filed under: dos,windows — sikathabis @ 6:40 am
Tags: ,

How to Create folder con and Nul.protected (more…)

June 12, 2011

How to display | > < ^ on dos command

Filed under: dos — sikathabis @ 7:08 pm
Tags:

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

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.