Can anyone help on finishing off a VB SCRIPT

  shreked 12:10 16 Apr 2018

Hi

I have the following DOS command that creates a folder for me and asks what its going to be called and moves the files into it.

What im trying to do is to 7zip and password protect the merged file.

Can anyone help?

Option Explicit

Const strDLFolder = "C:\Downloads" Dim objFSO, objWShell, objDLFolder, strNewFolder, objFile

Set objFSO = CreateObject("Scripting.FileSystemObject") Set objWShell = CreateObject("WScript.Shell")

If Not objFSO.FolderExists(strDLFolder) Then objFSO.CreateFolder(strDLFolder) objWShell.CurrentDirectory = strDLFolder Set objDLFolder = objFSO.GetFolder(strDLFolder) If objDLFolder.Files.Count = 0 Then WScript.Quit

Do Err.Clear strNewFolder = InputBox("Folder Name", vbLf & "Enter the name of the folder to be created:") If strNewFolder = False Then WScript.Quit On Error Resume Next objFSO.CreateFolder strNewFolder Loop While Err.Number <> 0 Or Not objFSO.FolderExists(strNewFolder)

On Error Goto 0 For Each objFile In objDLFolder.Files objFSO.MoveFile objFile.Name, strNewFolder & "\" Next

objWShell.Popup "All files moved.", 0, "Done", vbInformation Or vbSystemModal Or &h00040000&

What is Markdown?

Markdown lets you add more formatting to your post. Simply type in your post and it will display as written.

If you wish to add bold or italic characters, add a hyperlink to another website, a heading or a horizontal line, simply use the relevent icons above the text input field.

A preview of your post will appear in the grey box below. If you make a change and you're not happy, simply press the back arrow icon to undo.

Post a Reply

4500

Elsewhere on IDG sites

Google Pixel 3 review

Automatically create thousands of unique variations from one original design with this free…

iPhone XR release date, price & specs

Comment utiliser WhatsApp sur son iPad ?