8.3 Short Filename

24 Feb 2009 In: Scripting

I thought I will never be using 8.3 Short Filename and ditching them away for good… but boy I was wrong!

Ever heard of this another great little tool called “RichCopy”?  It’s done by a Microsoft programmer who produced an in-house tool called RichCopy (Look for version 2.51, no install required 188Kbyte size) that would run 3 threads and has many options about target / source copy with ACL or delta by size, time, ....

The problem with File Explorer or those who are a bit more advanced would use Robocopy is that it runs only with a single thread.  That is, it will copy 1 file at a time and sometimes if there are a lot of files and if the copying process somehow breaks halfway, you have to restart all over again.  With RichCopy, it will skip those files that already existed in the destination folder and running it with multiple threads, it can synchronize files between 2 folders extremely fast!

Btw, if you are copying 1 large file, using RichCopy is no different from using File Explorer since it couldn’t spawn multiple threads.

Now, back to the main storyline… :)  This RichCopy tool is already 13 years old and the batch command line doesn’t really like “spaces” or quotation marks “”.  But I have 2 folders with names that have spaces in them.  So, in my batch script, in order to get it working, I have to resort back to 8.3 short filename.  Well, you can say “Hey, why not use another newer tool?”  If anyone knows of another great tool like this, please let me know!  Trust me, this is the BEST file copying tool I’ve known.  Here is a sample of the batch script.

net use z: "\\<servername>\c$\Documentation" /user:<username> <password>

RichCopy2.51.exe z:\ D:\Docume~1\ /F /O /R 30000 /T 3 /I 1000 /LL 2

net use z: /delete /y

I’ve tried enclosing the source & destination paths with quotation marks, single quotation marks, etc but to no avail.  If anybody knows how, please do share it with me yah.  Better still, any newer equivalent great little tool like this?!  Thanks in advance.

Tips

To get the short filename, go to command prompt and type “dir /x”.


MBSA is a free tool by Microsoft to help scan a server to determine the security state compliance. The main feature I made use of it is the ability to scan for missing MS patches. Usually, we need to compile the list of missing patches and pass it to the Application team to test it out whether any of the patches affect or break their applications.

I have decided to post this is because I thought that every System Administrator should already know about this great tool, but I was wrong. One of my customers requested for this list and none of the System Admins know how to go about it.

Syntax

mbsacli.exe /target webserver /catalog c:\mbsa\wsusscn2.cab /n password+iis+os+sql /nvc /nd /rd c:\mbsa

These are the switches I’ve chosen:

/target webserver This is the server I am scanning
/catalog c:\mbsa\wsusscn2.cab This is the update cab I downloaded
/n password+iis+os+sql This is telling MBSA which scans NOT to perform. I just want to know about updates
/nvc Do not check for new version of MBSA
/nd This is telling MBSA not to download updates
/rd c:\mbsa This is the directory for my report

For more details on these and other available options use mbsacli /?

Ways to download wsusscn2.cab for offline use in a secured environment

Today, most places would have blocked Internet access on the servers in a Data Centre. Here are a couple of ways to download a copy of wsusscn2.cab for offline scanning.

Method 1:
1. Run mbsacli.exe by itself on a machine with Internet access. It will automatically download the wsusscn2.cab file and save it into either of the following folders:

  • C:\Documents and Settings\<username>\Local Settings\Application Data\Microsoft\MBSA\2.0\Cache\   
  • C:\Users\<username>\AppData\Local\Microsoft\MBSA\2.1\Cache

Method 2:
1. Download it from http://go.microsoft.com/fwlink/?LinkId=76054


About this blog

This is the code related blog of Paul Lim. I will try to post codes that I use daily for my work. Hopefully, it may help you out someday... :)


Sponsors