A customer called me today. He re-certified all server and users and asked if there is a way to rename the old servernames into the new ones in bookmark.nsf and desktop6.ndk.

You could use the DSKTOOL.EXE for this. But it must be placed on every workstation on every notes programm directory (and must be started with some DOS commands).

After a look on the environment from the customer I found a quick and easy way. He placed the notes datafolder on a network share (sure this isn´t supported, but it works) and with a small script I was able to remove all old servernames he had in the past and was also able to rename all server names with one batch script. The script created also a backup from bookmark.nsf and desktop6.ndk on the same drive (via 7za command line option).

All what I need for this script was a installed Lotus Notes Client and access to the root from the networkshared (mapped as drive Z) for there notes user. The script took 5 hours to update all 2.000 .

Click on read more to see the script.

 

Note:

The file dskfile.txt in the script define which server should be removed or renamed. See the help for the DSKTOOL.EXE for more informations.

 

@echo off
dir Z:\ /B /AD>C:\usershortnames.txt
ECHO.
ECHO Will ru nscript now...
ECHO.
ECHO.
for /F "eol=; tokens=1 delims= " %%i in (C:\usershortnames.txt) DO (
REM echo %%i

Echo ------------------------------------------------
Echo Will create a backup from the Desktop6.ndk now
Echo.
7za a Z:\%%i\desktop6_backup.zip Z:\%%i\desktop6.ndk
7za a Z:\%%i\bookmark_backup.zip Z:\%%i\bookmark.nsf
Echo ------------------------------------------------
echo.
echo.
Echo ------------------------------------------------
Echo Will delete unused mail.box and smtp.box
echo.
IF EXIST Z:\%%i\*.box del Z:\%%i\*.box  /Q
REM IF EXIST Z:\%%i\smtp.box del Z:\%%i\smtp.box  /Q
Echo ------------------------------------------------
echo.
echo.
Echo ------------------------------------------------
Echo copy desktop6.ndk for local change
echo.
copy Z:\%%i\desktop6.ndk "C:\Program Files\IBM\Lotus\Notes\data" /Y
copy Z:\%%i\bookmark.nsf "C:\Program Files\IBM\Lotus\Notes\data" /Y
Echo ------------------------------------------------
echo.
echo.
Echo ------------------------------------------------
Echo Will remove old Servernames
echo.
"C:\Program Files\IBM\Lotus\Notes\dsktool.exe" "C:\0000Rename_Server\dskfile.txt" -R -D -V -I
Echo ------------------------------------------------
echo.
echo.
Echo ------------------------------------------------
Echo Will copy changed files back
echo.
copy "C:\Program Files\IBM\Lotus\Notes\data\desktop6.ndk" Z:\%%i /Y
copy "C:\Program Files\IBM\Lotus\Notes\data\bookmark.nsf" Z:\%%i /Y
Echo ------------------------------------------------

)

pause

Leave your comments

Post comment as a guest

0

Comments

    • No comments found