commit b5d67b88138a0d6b2d55b89f006d3d00b5b4a6d3 Author: Kolan Sh Date: Wed Nov 30 02:00:46 2016 +0300 Initial commit. diff --git a/----lastinpath.bat b/----lastinpath.bat new file mode 100644 index 0000000..96a78d3 --- /dev/null +++ b/----lastinpath.bat @@ -0,0 +1,27 @@ +@echo off +rem **************************** +rem : lastinpath.bat +rem 7/15/2008 +rem : 7/15/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : +rem call lastinpath VarName +rem +rem \ VarName. +rem , +rem call lastinpath KDE c:\home\\\ +rem "" KDE. +rem **************************** +rem : lastarg.bat +rem **************************** + +:shift1 +if not '%3'=='' ( + shift /2 + goto :shift1 +) +set %1=%2 + + diff --git a/Rar.exe b/Rar.exe new file mode 100644 index 0000000..e69de29 diff --git a/UnRar.exe b/UnRar.exe new file mode 100644 index 0000000..e69de29 diff --git a/clearbuild.bat b/clearbuild.bat new file mode 100644 index 0000000..b1e3c27 --- /dev/null +++ b/clearbuild.bat @@ -0,0 +1,17 @@ +@echo off +rem **************************** +rem : clearbuild.bat +rem 7/5/2008 +rem : 7/12/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : , +rem +rem +rem **************************** +rem : +rem **************************** + +del /s /q /f *.~* *.bak *.bakup *.bkp *.original *.old *.tds *.tmp *.temp *.obj *.o *.ncb BuildLog.htm *.ilk *.pch *.pdb *.manifest *.dep *.idb *.csm *.ilc *.ild *.ilf *.ils *.mbt *.mrt *.#* *.map + diff --git a/cleardir.bat b/cleardir.bat new file mode 100644 index 0000000..6926e75 --- /dev/null +++ b/cleardir.bat @@ -0,0 +1,28 @@ +@echo off +rem **************************** +rem : cleardir.bat +rem 10/24/2008 +rem : 10/24/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : +rem , +rem **************************** +rem : +rem **************************** + +if '%1'=='' ( + del /q * + for /d %%i in (*) do ( + rmdir /s /q "%%i" + ) +)else ( + del /q %1\* + for /d %%i in (%1\*) do ( + echo %1\%%i + rmdir /s /q "%%i" + ) +) + + diff --git a/cleardirs.bat b/cleardirs.bat new file mode 100644 index 0000000..f15423c --- /dev/null +++ b/cleardirs.bat @@ -0,0 +1,25 @@ +@echo off +rem **************************** +rem : cleardirs.bat +rem 10/24/2008 +rem : 10/24/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : +rem +rem **************************** +rem : +rem **************************** + +if '%1'=='' ( + for /d %%i in (*) do ( + cleardir "%%i" + ) +)else ( + for /d %%i in (%1\*) do ( + cleardir "%%i" + ) +) + + diff --git a/delbkps.bat b/delbkps.bat new file mode 100644 index 0000000..6c765fb --- /dev/null +++ b/delbkps.bat @@ -0,0 +1,17 @@ +@echo off +rem **************************** +rem : delbkps.bat +rem 7/5/2008 +rem : 7/12/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : , +rem +rem +rem **************************** +rem : +rem **************************** + +del /s /q /f *.~* *.bak *.bakup *.bkp *.original *.old *.tds *.tmp *.temp +rem *.obj diff --git a/fibo_proc.bat b/fibo_proc.bat new file mode 100644 index 0000000..58d3a0b --- /dev/null +++ b/fibo_proc.bat @@ -0,0 +1,25 @@ +@echo off +rem **************************** +rem : fibo_proc.bat +rem 7/10/2008 +rem : 7/15/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : +rem . +rem , +rem fibo +rem Arg1 - +rem Arg2, Arg3 - 2 +rem **************************** +rem : +rem **************************** + +if %Arg1%==1 goto :EOF +if %Arg1%==2 goto :EOF +set /a Arg1=%Arg1%-1 +set /a tmp=%Arg3% +set /a Arg3=%Arg2%+%Arg3% +set /a Arg2=%tmp% +call fibo_proc Arg1 Arg2 Arg3 diff --git a/fibonachi.bat b/fibonachi.bat new file mode 100644 index 0000000..7954051 --- /dev/null +++ b/fibonachi.bat @@ -0,0 +1,25 @@ +@echo off +rem **************************** +rem : fibonachi.bat +rem 7/10/2008 +rem : 7/15/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : +rem , +rem +rem **************************** +rem : fibo_proc.bat +rem **************************** + + +@echo off +set /a Arg1=%1 +set /a Arg2=1 +set /a Arg3=1 +call fibo_proc +echo %Arg3% + +pause + diff --git a/format_c.bat b/format_c.bat new file mode 100644 index 0000000..9c42112 --- /dev/null +++ b/format_c.bat @@ -0,0 +1,3 @@ +echo %* +indent -npro -kr -i8 -ts8 -sob -l128 -ss -ncs -cp1 %* +del *~ diff --git a/format_cpp.bat b/format_cpp.bat new file mode 100644 index 0000000..048c7b4 --- /dev/null +++ b/format_cpp.bat @@ -0,0 +1,5 @@ +rem -S -F -j +rem -B -G -P -D -d -U -E -y -e -J -O -o +rem astyle --style=1tbs -x -C -N -L -w -Y -f --max-instatement-indent=80 --min-conditional-indent=0 -T8 -c -k3 --mode=c -n --lineend=windows -F -H -U -p -K %* +rem astyle --style=linux -x -C -N -L -w -Y -f --max-instatement-indent=80 --min-conditional-indent=0 -T8 -c -k3 --mode=c -n --lineend=windows -F -H -U -p -K %* +astyle --style=linux -C -N -L -w -Y -f --max-instatement-indent=80 --min-conditional-indent=0 -T8 -c -k3 --mode=c -n --lineend=windows -F -H -U -p %* diff --git a/getBCBtemplate.bat b/getBCBtemplate.bat new file mode 100644 index 0000000..be253ec --- /dev/null +++ b/getBCBtemplate.bat @@ -0,0 +1,3 @@ +mkdir %1 +copy c:\home\kolan\devel\templ\%1\* %1\ + diff --git a/gzip.exe b/gzip.exe new file mode 100644 index 0000000..e69de29 diff --git a/hide.bat b/hide.bat new file mode 100644 index 0000000..9366ed4 --- /dev/null +++ b/hide.bat @@ -0,0 +1,16 @@ +@echo off +rem **************************** +rem : hide.bat +rem 8/5/2008 +rem : 8/5/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : ( ) +rem +rem **************************** +rem : +rem **************************** + +attrib +h /s %1 + diff --git a/lastparm.bat b/lastparm.bat new file mode 100644 index 0000000..14ec1e1 --- /dev/null +++ b/lastparm.bat @@ -0,0 +1,24 @@ +@echo off +rem **************************** +rem : lastparm.bat +rem 7/15/2008 +rem : 7/15/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : +rem , +rem , +rem call lastparm v1 +rem v1 +rem **************************** +rem : lastarg.bat +rem **************************** + +:shift1 +if not '%3'=='' ( + shift /2 + goto :shift1 +) +set %1=%2 + diff --git a/logrotate.conf.example b/logrotate.conf.example new file mode 100644 index 0000000..be528fe --- /dev/null +++ b/logrotate.conf.example @@ -0,0 +1,18 @@ +rem Sample configuration file for logrotatew + +rem Comments start with "rem", obviously + +rem Optional command to compress rotated logs +compresscmd gzip + +rem Extension that compressed files will have; "compressext" is required if you use "compresscmd" +compressext gz + +rem Optional command line arguments for the compression command; uncomment if necessary +rem compressoptions -v + +rem Rotate c:\temp\test.log, keeping 5 generations +c:\temp\test.log 5 + +rem Compress all files matching *.log in c:\temp\logs, keeping 5 generations +c:\temp\logs\*.log 5 \ No newline at end of file diff --git a/logrotatew.bat b/logrotatew.bat new file mode 100644 index 0000000..df01292 --- /dev/null +++ b/logrotatew.bat @@ -0,0 +1,125 @@ +@echo off +rem The author of the scipt can be found here http://www.datori.org/?p=7 +rem Poor man's logrotate for Windows command shell + +rem Usage: cmd /v:on /c logrotate.cmd [-f ] +rem where is a fully qualified name of a configuration file. +rem If is not specified an attempt is made to locate +rem logrotatew.conf in the current directory. If it is not found the script +rem fails. + +rem A configuration file specifies log file name patterns and how many +rem generations to keep. For example, a line in the configuration file: +rem "c:\temp\*.log 5" will cause rotation of every file with the extension +rem ".log" in the specified directory, keeping 5 generations of rotated files. +rem The rotated files can be optionally compressed. See comments in the sample +rem logrotatew.conf for more details. + +rem The script rotates the los specified by the configuration file each time +rem it is invoked. Schedule it in Windows Scheduler as often as you need, e.g. +rem at 23:55 /every:Su cmd /v:on /c logrotatew.cmd -f c:\logrotatew.conf + +rem NOTE: the script must be invoked with "cmd /v:on /c logrotate.cmd [-f ]" +rem otherwise it will not work properly! + +rem Copyright (c) Nick Ivanov/datori 2007 +rem All rights reserved. +rem +rem Redistribution and use in source and binary forms, with or without +rem modification, are permitted provided that the following conditions +rem are met: +rem 1. Redistributions of source code must retain the above copyright +rem notice, this list of conditions and the following disclaimer. +rem 2. Redistributions in binary form must reproduce the above copyright +rem notice, this list of conditions and the following disclaimer in the +rem documentation and/or other materials provided with the distribution. +rem 3. The name of the author may not be used to endorse or promote products +rem derived from this software without specific prior written permission. +rem +rem THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +rem IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +rem OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +rem IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +rem NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +rem DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +rem THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +rem THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +rem === Begin main === + +setlocal + +rem Default configuration file +set _CONFIGFILE=logrotatew.conf + +rem See if another config file is specified + +if "%1" == "-f" set _CONFIGFILE=%2 + +if not "%1" == "" if not "%1" == "-f" (echo [err] Invalid switch: "%1" & exit /b 1) + +rem See if config file exists +if not exist !_CONFIGFILE! echo [err] Configuration file !_CONFIGFILE! not found & exit /b 1 + +rem Parse the file and invoke rotation subprogram for each file name that matches the pattern +for /f "tokens=1,2,3,*" %%f in (!_CONFIGFILE!) do call :f_cfg %%f %%g %%h + +endlocal +goto :eof + +rem ==== End main ==== + + +rem === Begin f_cfg === +:f_cfg + +rem Parse configuration file + +rem Skip comments and blank lines +if "%1" == "" goto :eof +if /I "%1" == "rem" goto :eof + +if /I "%1" == "compresscmd" set _COMPR_=%2 & goto :eof +if /I "%1" == "compressext" set _EXT_=%2 & goto :eof +if /I "%1" == "compressoptions" set _COPTS_=%2 & goto :eof + +rem This must be a file specification +for %%n in (%1) do call :f_rotate %%n %2 + +goto :eof + +rem ==== End f_cfg ==== + +rem === Begin f_rotate === +:f_rotate + +rem Delete the last file in sequence +if exist %1.%2 del /q %1.%2 +if exist %1.%2.!_EXT_! del /q %1.%2.!_EXT_! + +rem Rotate non-current files +for /l %%i in (%2,-1,2) do ( + set i=%%i + set /a j=i-1 + for /f %%f in ("%1") do ( + if exist %1.!j!.!_EXT_! ren %1.!j!.!_EXT_! %%~nxf.%%i.!_EXT_! + if exist %1.!j! ( + ren %1.!j! %%~nxf.%%i + if not "!_COMPR_!" == "" !_COMPR_! !_COPTS_! %1.%%i + ) + ) +) + +rem Rotate current file +for /f %%f in ("%1") do ( + ren %1 %%~nxf.1 + if not "!_COMPR_!" == "" !_COMPR_! !_COPTS_! %1.1 +) + +goto :eof + +rem ==== End f_rotate ==== + diff --git a/makedirs.bat b/makedirs.bat new file mode 100644 index 0000000..4ac614e --- /dev/null +++ b/makedirs.bat @@ -0,0 +1,19 @@ +@echo off +rem **************************** +rem : makedirs.bat +rem 7/13/2008 +rem : 7/13/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : +rem . , makedirs 56 88 kolya +rem kolya56, kolya57, ..., kolya88 +rem **************************** +rem : +rem **************************** + +for /l %%i in (%1 1 %2) do ( + mkdir %3%%i +) + diff --git a/rardir.bat b/rardir.bat new file mode 100644 index 0000000..928b275 --- /dev/null +++ b/rardir.bat @@ -0,0 +1,32 @@ +@echo off +rem **************************** +rem 業਩: rardir.bat +rem ᮧ 7/5/2008 +rem ᫥ : 7/12/2008 +rem : 誨 . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem ᠭ: ᨭ஭ (ᮧ +rem 室) 娢 ࠭ +rem ४ਥ. ᫨ ४ +rem ࠬ஬, 娢 ᮧ ⥪饩 +rem ४ਨ, - த⥫᪮. +rem **************************** +rem : ॡ rar  ᨨ +rem 㯠 ६ ४ਨ, +rem ।񭭮 ६ TMP +rem **************************** + +if '%1'=='' ( + cd > "%TMP%\rardir.tmp" + for /f "usebackq tokens=1-31 delims==\" %%A in (`type "%TMP%\rardir.tmp"`) do ( + cd .. + del /s/q/f "%TMP%\rardir.tmp" + rardir_proc.bat %%A "%%B" "%%C" "%%D" "%%E" "%%F" "%%G" "%%H" "%%I" "%%J" "%%K" "%%L" "%%M" "%%N" "%%O" "%%P" "%%Q" "%%R" "%%S" "%%T" "%%U" "%%V" "%%W" "%%X" "%%Y" "%%Z" + goto :EOF + ) +) +else ( + rar a -as %1.rar %1 +) + diff --git a/rardir_proc.bat b/rardir_proc.bat new file mode 100644 index 0000000..48d9ab7 --- /dev/null +++ b/rardir_proc.bat @@ -0,0 +1,25 @@ +@echo off +rem **************************** +rem : rardir_proc.bat +rem 7/13/2008 +rem : 7/13/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : +rem , . +rem \ ( tab), +rem , "c:" "Documents and Settings" "" " ". +rem "", +rem " .rar". +rem **************************** +rem : rar +rem **************************** + +:shift1 +if not %2=="" ( + shift /1 + goto :shift1 +) +rar a -as %1.rar %1 + diff --git a/rardirs.bat b/rardirs.bat new file mode 100644 index 0000000..f2bf2a1 --- /dev/null +++ b/rardirs.bat @@ -0,0 +1,20 @@ +@echo off +rem **************************** +rem : rardirs.bat +rem 7/5/2008 +rem : 7/12/2008 +rem : . . kolan klmn +rem E-mail: xalava@bk.ru +rem **************************** +rem : ( +rem ) +rem +rem **************************** +rem : rar +rem **************************** + +for /d %%i in (*) do ( + rar a -as "%%i.rar" "%%i" +) + + diff --git a/sync_any_hg.bat b/sync_any_hg.bat new file mode 100644 index 0000000..f91d783 --- /dev/null +++ b/sync_any_hg.bat @@ -0,0 +1,8 @@ +hg pull +hg up +hg sta +pause +hg addremove +hg ci -m "данные с работы" +hg push +pause