VBS: Copy files and display a progress bar

The below script with copy files and display a standard windows progress bar.

' --------------------------------------------------------
' VBS Script to run a Query againt a Active Directory Domain
'
' Author: Phil Eddies
' https://geekshangout.com
'
' Disclainer:
' Use of this script / software is entirely at your own risk no support, warranty 
' or guaranty is given.
' 
' The author or GeeksHangout.com take not responsibility for any damage or problems
' caused by this script / software.
'
' Copyright 2008 Philip Eddies
'
' Licensed under GPL
'    This program is free software: you can redistribute it and/or modify
'    it under the terms of the GNU General Public License as published by
'    the Free Software Foundation, either version 3 of the License, or
'    (at your option) any later version.'
'
'    This program is distributed in the hope that it will be useful,
'    but WITHOUT ANY WARRANTY; without even the implied warranty of
'    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'    GNU General Public License for more details.'
'
'    You should have received a copy of the GNU General Public License
'    along with this program.  If not, see <http://www.gnu.org/licenses/>.
'
' --------------------------------------------------------
 
Set wshFSO=Createobject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
 
Const FOF_CREATEPROGRESSDLG = &H0&
strPictureTargetDIR = "S:\TargetFolder" 
Set objFolder = objShell.NameSpace(strPictureTargetDIR) 
 
'Copy Pictures
objFolder.CopyHere "C:\SourceFolder\*.jpg", FOF_CREATEPROGRESSDLG
 
 
msgbox "Copy Complete!"

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.