Welcome to the Blogcast Repository Sign in | Join | Help
Search BlogCastRepository.com for:
in Search

239 BlogCasts in The BlogCast Repository!

Matt Broadstock

Check us out!
SMS Utilities

April 2006 - Posts

  • Modifying Lotus Notes cache settings

    Another lazy one that will mostly be from an e-mail I sent to the technical staff where I am consulting. We have the Notes client files redirected and the cache.ndk file is eating up TONS of space on the file servers..

    -------------------------------------------------------

    There are two settings that control the cache for the Notes client. Like most other settings, they are both in the Notes.ini.

    InitialCacheQuota is used to limit the size of the cache file.

       (i.e. "InitialCacheQuota=3072" to set a max size of 3MB)

     http://www-1.ibm.com/support/docview.wss?uid=swg21091866


    Cache is used to redirect the location of the cache file. This is the one we wanted to move to the C: instead of M: but ran into issues with people who use Citrix for Notes because there is no C: on those Citrix servers. We don't have a good plan of attack on this right now.

       (i.e. "Cache=c:\documents and settings\mbroad\notes\cache.ndk")


     http://www-1.ibm.com/support/docview.wss?rs=0&uid=swg21155947


    If anyone is interested in the batch files that I have written that will update the Notes.inis out on your user's M: drives I can send it to you and go over how it works. It is only two lines long but there are some things you will want to understand before using it.

     

    Batch File to modify Notes.INIs on file shares (if you redirected the Notes client files)

    REM Modifies the cache location-only runs on folders that match the wildcard specified
    rem for /d %%i in (\\s009-ns5\sharename\usersystem\a*) do echo cache=c:\documents and settings\%%~ni\notes\cache.ndk >> "%%i\application data\lotus\notes\data\notes.ini"

    REM Modifies the cache size-only runs on folders that match the wildcard specified
    rem for /d %%i in (\\s009-ns5\sharename\usersystem\a*) do echo InitialCacheQuota=3072 >> "%%i\application data\lotus\notes\data\notes.ini"

    PAUSE

    Share this post:                                       
  • Purging redirected My Documents Recycle Bins from file servers

    I'm being lazy on this one. This is from an e-mail I just sent out to the technical staff where I am currently consulting

    ---------------------------------------------------------------------

    Here's another dangerous one. This is a simple two-line batch file that will delete all the files in the Recycle Bin in each of your user's UserHome folders. This was requested in last week's meeting.


    for /d %%i in (\\s009-ns5\ssmr\userhome\a*) do @echo rem rd /q/s "%%i\my documents\recycler"
    pause


    The text in green needs to be the path to your UserHome folder.

    The text in red is the wildcard for which user folders you want to process. This example will just process the folders that begin with the letter "A". You could put in "*" to run against all accounts or you could go the other route and put in a full username to just process a single folder (might be useful if you want to try it out).

    The text in blue needs to be removed before the script will actually do anything. The echo means it will just show the command that it would run instead of actually running it. The 'rem' is just another thing I put in there to make sure no one accidentally ran it without understanding how it works.


    Basically, it will run the "RD /S/Q" command on each 'recycler' folder in UserHome\%username%\My Documents.

    Example of what it does:

    rd /q/s "\\s009-ns5\ssmr\userhome\AEGANN\my documents\recycler"
    rd /q/s "\\s009-ns5\ssmr\userhome\AMAGOS\my documents\recycler"
    rd /q/s "\\s009-ns5\ssmr\userhome\AMANWA\my documents\recycler"
    rd /q/s "\\s009-ns5\ssmr\userhome\APRESL\my documents\recycler"


    You may or may not remember, but it is impossible to delete files from the Recycle Bin based on deletion date or anything like that. Unless you go through the GUI, it is an all or nothing affair. You can read the article at http://support.microsoft.com/kb/136517/EN-US/ if you want to understand why this is. Basically, if we selectively delete files, the index gets corrupt and none of the files will be visible in the GUI Recycle Bin (even though the file is actually still there). And, trust me, it is all but impossible to try to modify that index file manually. :)

    Also, if you haven't ever used the FOR command, it can be your best friend for automating a repetitive task. It can be used in a lot of different ways other than processing multiple subfolders. (Here's where I referenced some samples they could review--I will put them at the bottom of the post) There isn't any great documentation explaining each sample but most of them are fairly easy to understand. But, the FOR command can be extremely powerful so please contact someone before using it if you aren't 100% sure what you are doing. Just running "FOR /?" from the command prompt will give you a lot of info on it (probably more info that you want to know...)

     

    SAMPLES:

    REM Exporting group membership
    global "G046-Codefinder" ds >c:\codefinder.txt

    REM TO process each entry in a text file
    for /f %%i in (c:\codefinder.txt) do echo cacls \\%%i\c$\windows\hbowem32.ini /E /G Users:C

    REM To return just the folder names for all subfolders in a folder
    for /d %%i in (\\s009-ns5\ic\userhome\*.*) do @echo %%~ni

    REM To process each subfolder in a specific folder (returns entire path)
    for /d %%i in (\\s009-ns5\ic\userhome\*.*) do @echo %%i

    REM Example of setting a "fake" delimiter so everything is assigned to %%i
    for /f "tokens=1-20 delims=#" %%i in ('dir c:\*.*') do @echo %i%

    REM Example that uses multiple variables based on the default delimiters (tab and space)
    for /f "tokens=1-20" %i in ('dir c:\*.*') do @echo %i %j %k

    REM Example that shows returning specific tokens using a custom delimiter
    for /f "tokens=1-3 delims=, " %i in (c:\test.csv) do @echo %k   %j

    Share this post: