RAR Project Archive Example

Posted on Wednesday, May 19, 2010 in MS OS

Example removes “.svn” directories from archive:
ECHO OFF
SET release=%date:~12,2%.%date:~4,2%.%date:~7,2%.%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%
SET release=%release: =%
SET winrar="\program files\WinRAR\WinRAR.exe" a -ep1 -e -r -t -x*\.svn*
SET box=M:\

CLS
:MENU
ECHO.
ECHO Archive Project
ECHO -----------------------
ECHO.
ECHO 1 - Example Project
ECHO Q - Exit
ECHO.
SET /P M=Type option then press ENTER:
IF %M%==1 GOTO EXAMPLE
IF %M%==Q GOTO:EOF
IF %M%==q GOTO:EOF

:_EOF
pause
GOTO:EOF

:EXAMPLE
SET ver=1.0.0
ECHO Archiving release
%winrar% "%box%example_project.%ver%.%release%.rar" x:\example_project\*.*
ECHO Done archiving release: example_project.%ver%.%release%.rar
ECHO.
GOTO _EOF

NetBeans PHP Installer Hangs Fix

Posted on Tuesday, May 18, 2010 in MS OS

For NetBeans 6.8 PHP Windows Installer
If installer hangs, run from the console
netbeans-6.8-ml-windows.exe --extract
and then
java -jar bundle.jar > log.txt 2>&1

Found here

Outlook 7 Profile Location

Posted on Wednesday, March 17, 2010 in MS OS

C:\Documents and Settings\user\Local Settings\Application Data\Microsoft\Outlook

FTP Auto Sync

Posted on Wednesday, March 10, 2010 in MS OS

Download app:
Go to download

FTP Auto Sync Example:
Copy download files to C:\ftp

Setup C:\ftp\example.ini
[Source]
Type=F
Dir=C:\autouploads\
ExcludeDir=_*
ExcludeFile=_*;*.log
Case=Sensitive
DSTChange=201003140200
DSTDifference=60
[Destination]
Server=ftp.example.com
User=ftp_user
Pass=ftp_pwd
Dir=/auto/upload/dir/
Type=M
TimeOut=60
Passive=Yes

Now setup batch job that can be scheduled: upload.bat
cd C:\ftp
FTPSync example /FULL /QUIET

Can use “/DEBUG” to output log files

More docs here:
Docs

Close Batch Window After Execution

Posted on Tuesday, March 9, 2010 in MS OS

Example will start exe file and close window, good for batch files
ECHO off
ECHO.
ECHO Starting file.exe
ECHO.
start "" "C:\dir\file.exe"
ECHO.
ECHO Done
ECHO.

Also can use /MIN to start app window minimized like:
start /MIN "" "C:\dir\file.exe"

XP Schedule Defrag

Posted on Friday, March 5, 2010 in MS OS

Schedule XP defrag

Windows 7 SENDTO Directory

Posted on Tuesday, March 2, 2010 in MS OS

Shortcut, address bar: shell:sendto

MS DOS Batch File Log

Posted on Wednesday, January 20, 2010 in MS OS

Log example (overwrite log file):
c:\example.bat > c:\log.txt

Log example (append log file):
c:\example.bat >> c:\log.txt

Remove @ECHO off for full output

Include errors in log:
c:\example.bat > c:\log.txt 2>&1

Run System Restore from Command Line

Posted on Tuesday, November 3, 2009 in MS OS

%systemroot%\system32\restore\rstrui.exe