From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Mass encryption of files

Hi All,

I have a project, which is supposed to be send to customer. Since I want to encrypt all the files which could be encrypted, I am currently doing manual encryption of roughly 50-100 files every time I send new code to customer. It would be much more convenient to have some option of mass encryption to put all vbs and sud files in certain folder to vbc and suc files respectively. Is there any way to do so? Any idea would be most welcome.

0 Kudos
Message 1 of 3
(2,160 Views)

DIAdem has the command

AutEdEncode

to encrypt a file.

 

The following script uses it to encrypt all files in a folder.

You may extend it by moving the encrypted files after creating them.

 

Option Explicit
dim folderPath : folderPath = "C:\temp"

dim fso : Set fso = CreateObject("Scripting.FileSystemObject")
dim oFile : For Each oFile In fso.GetFolder(folderPath).Files
  If UCase(fso.GetExtensionName(oFile.Name)) = "VBS" or UCase(fso.GetExtensionName(oFile.Name)) = "SUD" Then
    call AutEdEncode(oFile.path)
  End if
Next
Message 2 of 3
(2,124 Views)

Thank you very much AndreasK, it is exactly what I was looking for. 

0 Kudos
Message 3 of 3
(2,121 Views)