* info: Generally, first I use this script for rename file of video from VCD which extension *.DAT become *.MPG in order to can be come up (Thumbnail) of Appearance Explorer.
Virus groan some file type in relying on file extension, and because of most virus groan file *.doc, hence in example of hereunder I will apply it at this file, that is fox extension *.doc become *.MSWORD. (you can also may determine result rename by self besides *.MSWORD )
- Following in this step:
Dim Drive, Root, fname2. After application of notepad emerge to type or copy > paste under script :
Drive = "D" 'drive to be processed'
Set Root = CreateObject("Scripting.FileSystemObject")._
GetDrive(Drive).RootFolder
Set fname = New RegExp
With fname
.Pattern = "\.doc$" 'extension file to rename’
.IgnoreCase = True
.Global = False
.Multiline = False
End With
Call Rename(Root, fname)
Sub Rename(Folder, RegExp)
Dim SubFolder, File
For Each File in Folder.Files
If RegExp.Test(File.Name) Then
File.Name = RegExp.Replace(File.Name, ".MSWord") 'result rename’
End If
Next
For Each SubFolder In Folder.SubFolders
Call Rename(SubFolder, RegExp)
Next
End Sub
- Its way is:
1. Enter Control Panel > Folder Options > Files Type
2. Look for and click knob "New" last at column "File Extension: "type "msword" (if you conduct modification of at script and alter string "MSWORD" with other dissimilar, accommodate).
3. Knob click "<<>
4. Last click “OK”
5. Finish…
6. (Optional) change picture default icon in order to be not gullible with virus file which often icon look like File Word.
If you wish to alter also important extension file of other you enabled can be attacked by virus of like *.xls, *.ppt, *.txt and others, hence conduct modification of at script and don't forget for the association it again with appearance default program./ process like way of above.
- Side Effects
a. This Script VBS will only just rename extension file non file name, become for example if you have so called file.doc hence will be altered to become file *.MSWORD. Become don't doubt, its original name nope will change.
b. If file you to change its extension have the character of shared document file or which you make to be propagated to by broaden in local network area and also to other dissimilar computer hence will a few disturbing one who will open it, cause in their computer is the extension of association not yet with appearance program. Become if we like to can open this file better other dissimilar computer of rename return its extension to *.doc or can be opened by: Click - right > Properties > Change…last searched "Microsoft Office Word" (Application Microsoft Word) in column "programs" last click Ok > Apply > Ok - new open.
c. This Applying Script VBS at Drive C:\"maybe" - (maybe very infinitesimal) can bother performance of application figuring in file *.doc of at its process. Hence from that I suggest to remove your important file from drive C:\ to other drive so that drive C:\ needn't in process use this Script VBS.
- Message to all VMI (Virus Maker Indonesia):
Reference :
www.ilmukomputer.com
Trik Jitu Amankan File-File Penting Dari VIRUS