Can anyone help on finishing off a VB SCRIPT

  shreked 12:10 16 Apr 2018
Locked

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&

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Mi Mix 3 UK Review: Xiaomi's Flagship Slides Into The UK

Ken Sausage's illustrations for Powerade mash-up Where's Wally with Morph

Apple Maps vs Google Maps

Amazon Prime : prix, avantages et offres gratuites