How to automate a commit/update with Tortoise SVN using a batch file

Your SVN project should already be checked out. Enter the following in a batch file (.bat):

[bash]@echo off
echo.
echo. [ SVN Committer ]
:: The two lines below should be changed to suit your system.
set SOURCE=C:\projects\my_svn_project\
set SVN=C:\Program Files\TortoiseSVN\bin
echo.
echo. Committing %SOURCE% to SVN…
“%SVN%\TortoiseProc.exe” /command:commit /path:”%SOURCE%” /closeonend:0
echo. done.
echo.
echo. Operation complete.[/bash]

[bash]@echo off
echo.
echo. [ SVN Updater ]
:: The SOURCEj below should be already set to fit your system.
echo. Updating %SOURCE%\ from SVN…
“%SVN%\TortoiseProc.exe” /command:update /path:”%SOURCE%\” /closeonend:2
echo.        done.
[/bash]

Note:
/closeonend:0 = bring up the dialog so you can select what files to commit
/closeonend:2 = omit the dialog and proceed with the operation

 

How to login with Windows Telnet automatically using vbs

Enter the following script and save it as a .vbs file:

[vb]Set obj = CreateObject(“WScript.Shell”)
obj.run”cmd”
WScript.Sleep 500

obj.SendKeys”telnet your.ip.add.ress”
obj.SendKeys(“{Enter}”)
WScript.Sleep 500

obj.SendKeys”username”  ‘telnet username
obj.SendKeys(“{Enter}”)
WScript.Sleep 500

obj.SendKeys”password”  ‘telnet password
obj.SendKeys(“{Enter}”)
WScript.Sleep 500

[/vb]

Useful Linux/Dos Commands

Navigation:
[bash]cd /usr/local/i-net\ crystal-clear #use \ (backslash) to replace space in path

ls #list dirs/files of current path, normal column-view
dir #dos
dir /q /a:r|h|s #to list dirs and files with attributes and owners
dir /-n #to list dirs and files with their short 8.3 names
dir /x #to list dirs and files with short 8.3 names and long names

ls -x #to list dirs/files wide-view
dir /w #dos

history #lists the recently executed commands by logged in user
!! #executes the last command that was executed
!985 #executes the command numbered 985
!ls #executes the command stringed ‘ls’

find . -name data*.xml #find all matches within current dir and below

cp /source/file /dest/path/ #copy source file to dest-path
copy c:\source\file c:\dest\path #dos

cp -r #copy source to destination, including directories
copy /r #dos

cp -rT /source/path  /dest/new-path
#copy source to newly destination (create) including contents

rm -Rf * #delete all in current dir (R = recursive, f = force)[/bash]

Network:
[bash]./ifconfig #command to display interface devices info
ipconfig #dos
/sbin/ifconfig #RedHat or CENTOS command

./ifconfig eth0 192.168.0.10  #command to set eth0 with new ip address

wget ftp://url_Link #url file retriever, i.e. non-interactive download from ftp link[/bash]

Executable/Archive:
[bash]rpm -ivh ./nameOfFile.rpm #executes an executable file, i=install, v=verbose, h=show descriptions while install

cpio -idv < nameOfArchive.cpio #extract a cpio archive file into current dir
ls | cpio -ov > nameOfArchive.cpio #pack listed files into a cpio archive

unzip ./source.zip -d ./destDir #extract the file source.zip from current dir to the destDir in current dir

tar -zxvf ./source.tar.gz #will do in current dir
tar -C /myfolder -zxvf source.tar #will extract to myfolder dir

java -jar setup.jar #execute a jar file using java

lsof -wni tcp:9000 #show the process using port 9000[/bash]

System:
[bash]uname -a #outputs the ‘system info’
ps -A #show all processes running on system
kill -9 22017 #kill a process with PID=22017[/bash]

Multi-Commands:
Send a command to the background: add ” &” to end of each/the command
Send a command to the background, but wait for previous to complete: add ” &&” to end of each/the command
Separate command sequences: add ” ;” between the commands