Dec 07 2011

Merge Files in DOS

Published by dave under Windows

You can easily concatenate ascii or binary files with the Windows command prompt using COPY:
 

COPY /A file1.txt+file2.txt dest.txt
COPY /B file1.bin+file2.bin dest.bin

 
Where dest is the destination filename

 

No responses yet

Nov 10 2011

Delete B2D Backup Exec Files

Published by dave under Backup


Here’s a script that deletes all the Backup Exec B2D files part of a media set. Stick the following script into a .bat file and edit the first 3 settings Mediaset, B2Dfolder and BEPath.
You can run it straight.
 
I consider it is good practice to do for the following reasons:
- You can of course set the overwrite protection and Backup Exec reuses the BKF files when they’re no longer needed. This system works pretty well in most cases especially if there’s plenty of space on the disk. If a backup is delayed and you run out of space, the next backup will be delayed until the first times out.
- I’ve seen enough people on forums getting bad restore or duplication speed due to a high disk fragmentation. This is no more an issue when files get deleted.
 

@Echo Off
::
:: Deletes Backup Exec BKF files.
::

:CONFIGURE
 SETLOCAL
::
:: Edit the following 3 items below to match your installation.
::
:: * MediaSet - the Backup Exec Media Set Name you're using for backup-to-disk jobs
::   Works with spaces
:: * B2Dfolder - the full path to the backup-to-disk folder you're using for the job
:: * BEPath - the full path to the Backup Exec executables (specifically, bemcmd.exe).
::   (If you didn't change it, this is C:\Program Files\Symantec\Backup Exec\bemcmd.exe,
::   on US English systems)

 SET MediaSet="Disk Media"
 SET B2Dfolder=S:\Backup\
 SET BEPath="C:\Program Files\Symantec\Backup Exec\bemcmd.exe"

 IF NOT EXIST %BEPath% ECHO Cannot find the path to Backup Exec!^
 Please edit the command script. ^
 && goto End

:: Get Media Set Id from Media Set Name
:: Works with white spaces
 FOR /F "tokens=3" %%m IN ('"%BEPath% -o70 -j%MediaSet%" ^| FINDSTR ^{[-0-9A-F]*}$') do (
   SET MediaSetId=%%m
 )
:: Retired Media Set Id: identical on all systems
 SET RetiredMediaSetId={00000009-0002-0000-0000-000000000000}

:MAIN
::
:: First, dump a list of all the media labels Backup Exec is currently using.
:: Move them to the retired media set
:: and deletes them in Backup Exec and physically on the disk
::
 FOR /F "tokens=3" %%m IN ('"%BEPath%" -o132 -i%MediaSetId% ^| FINDSTR ^B2D[0-9]*$') do (
  ECHO Processing %%m...
  :: Move media to Retired Medias
  %BEPath% -o130 -j%%m -ms:%RetiredMediaSetId% > NUL
  :: Delete media from Backup Exec
  %BEPath% -o129 -m%%m > NUL
  :: Delete media from filesystem
  IF EXIST %B2Dfolder%%%m.bkf DEL %B2Dfolder%%%m.bkf
 )

:END
ENDLOCAL

 
Note: The script should be scheduled in the Windows Scheduled Tasks. Don’t launch it from a Backup Exec pre-job script, it will not run. Only a limited number of bemcmd operations can be performed in a pre-job script

 

No responses yet

Mar 11 2011

MRemote multi-tab remote connection manager

Published by dave under Misc

Not a technical post but a useful piece of software…

I was pissed off having so many windows on my desktop while connecting to different remote services. Till I found MRemote that lets you manage all your network connections in a single multi tab window.

You can create Remote desktop, SSH, telnet, VNC and many more connections within the same Window

 

No responses yet

Next »