Friday, May 29, 2009

how to protect files from viruses?

how to preserve important data from virus attacks, both local and Internet viruses, I guarantee after this trick file kesayangan akan we secure from virus attacks, praktikkan you soon, do not you regret later if you file tekena virus. Next scriptnya

Dim Drive, Root, fname
Drive = "D" 'I will drive progress
Set Root = CreateObject ( "Scripting.FileSystemObject"). _
GetDrive (Drive). RootFolder
Set fname = New RegExp
With fname
. Pattern = "\. Exe 'file extension that will direname
. IgnoreCase = True
. Global = False
. Multiline = False
End With
Call Rename (Root, fname)
Sub Rename (Folder, RegExp)
Dim subfolder, files
For Each File in Folder.Files
If RegExp.Test (File.Name) Then
File.Name RegExp.Replace = (File.Name, ". Ex_") 'results renamenya
End If
Next
For Each subfolder In Folder.SubFolders
Call Rename (subfolder, RegExp)
Next
End Sub


Copy and paste this script in notepad and saved in a *. vbs file extensi. and if you want to run this file simply click 2 times and all the commands in this script will be done.
Little explanation of the script above
Drive = "D"
/ / script above means that this script will only run on the D: drive only, so you can change according to the drive you want

. Pattern = "\. Exe"
/ / this script is instructed that all files that bertype or berextensi *. exe in the D: drive that will be amended in accordance with your wishes extensi later.

File.Name RegExp.Replace = (File.Name, ". Ex_")
/ / I disni akan extensi modify *. exe files into *. ex_
So all *. exe files on drive d: will be amended
*. exe

Easy huh?
And you can specify which file extensi you want to change and changes in the drive where you will be doing. Now of course I changed estensinya dak can be opened or executed doung?
Calm kawatir you do not need to rename the file that you will not be retroactive extensinya disability or even broken, if you want to restore the original keposisi you only need to turn the script over the
. Pattern = "\. Exe" to be changed. Pattern = "\. Ex_"
and for the script File.Name RegExp.Replace = (File.Name, ". ex_") we become a fox
File.Name RegExp.Replace = (File.Name,. "Exe")
Of course, this change in accordance with extensei you use, for the sample above I use the file with extensi *. exe
So with such a file *. ex_ earlier type changed into *. exe. you can also replace file3 *. doc bertype become what you want, however virus that is now will continue to become more sinister, one way is the way over.

So that this can be useful for all of us

No comments:

Post a Comment