UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Vb Script For Showing Filecopy Progress Status, vbs    
 
   
FrankRuperto
post Mar 15 2019, 07:21 PM
Post#1



Posts: 328
Joined: 21-September 14
From: Tampa Bay, Florida, USA


I have the following vb code for showing the windows default progress bar dialog box when backing up files to a jump drive, and I would like to make this work in vb script. I tried UIOption.AllDialogs in the .CopyFolder command, but that didnt work. Can this be done in vbs?

CODE
'VB program for backing up data folder to flash drive while displaying windows default progress dialog box.

Imports Microsoft.VisualBasic.FileIO

Class FileProgress
    Private Shared Sub Main()

        Dim sourcePath As String = "S:\Databases\Production\Armory\Data"

        Dim destinationPath As String = "F:\"

        FileSystem.CopyDirectory(sourcePath, destinationPath, UIOption.AllDialogs)
    End Sub
End Class

This post has been edited by FrankRuperto: Mar 15 2019, 08:15 PM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's.
Go to the top of the page
 
Doug Steele
post Mar 15 2019, 07:40 PM
Post#2


UtterAccess VIP
Posts: 22,228
Joined: 8-January 07
From: St. Catharines, ON (Canada)


I somehow doubt that's VB6 code: looks more that VB.Net to me.

AFAIK, VBScript can't provide you with the progress dialog. Sorry.

--------------------
Doug Steele, Microsoft Access MVP (2000-2018)
Personal webpage
Microsoft profile
Co-author: Access Solutions: Tips, Tricks, and Secrets from Microsoft Access MVPs, published by Wiley
Co-author: Effective SQL: 61 Specific Ways to Write Better SQL, published by Addison-Wesley Professional
Technical Editor: Access 2010 Bible, Access 2013 Bible, Access 2016 Bible, all published by Wiley
Technical Editor: SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition, published by Addison-Wesley Professional
Go to the top of the page
 
FrankRuperto
post Mar 15 2019, 07:56 PM
Post#3



Posts: 328
Joined: 21-September 14
From: Tampa Bay, Florida, USA


I tried this in vbs and as you said, it didnt work:

CODE
Option Explicit

        With WScript.CreateObject("Scripting.FileSystemObject")
            
                .CopyFolder "S:\Databases\Production\Armory\Data", "F:\", UIOption.AllDialogs
        
        End With
    
    msgbox "Backup Complete"



So if the previous code I posted is vb.net, then it should be able to run interpreted on any win box that has dotnet installed?
This post has been edited by FrankRuperto: Mar 15 2019, 08:12 PM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's.
Go to the top of the page
 
Doug Steele
post Mar 16 2019, 07:52 AM
Post#4


UtterAccess VIP
Posts: 22,228
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Sorry, I don't know enough about the innards of .Net to know what needs to be installed on the machine.

--------------------
Doug Steele, Microsoft Access MVP (2000-2018)
Personal webpage
Microsoft profile
Co-author: Access Solutions: Tips, Tricks, and Secrets from Microsoft Access MVPs, published by Wiley
Co-author: Effective SQL: 61 Specific Ways to Write Better SQL, published by Addison-Wesley Professional
Technical Editor: Access 2010 Bible, Access 2013 Bible, Access 2016 Bible, all published by Wiley
Technical Editor: SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition, published by Addison-Wesley Professional
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    5th December 2019 - 05:01 PM