srcfile="\path\to\bigfile"
destdir="\\server\share\path\to\dir"
Set SA=CreateObject("Shell.Application")
Set NS=SA.NameSpace(destdir)
NS.CopyHere srcfile,16
Here is a VBScript solution for you. It is really just a fake bar, but it let's your user know something is happening.
set x = createobject("internetexplorer.application"
'in code, the colon acts as a line feed
x.navigate2 "about:blank" : x.width = 350 : x.height = 80 : x.toolbar = false : x.menubar = false : x.statusbar = false : x.visible = true
x.document.write "<font color=blue>"
for n = 1 to 100
x.document.write "|"
wscript.sleep 50
x.document.title = n & " %"
next
'close the window
x.quit
set x = nothing
Dim Network,shell,fso,ParentFolder,objFolder,objShell
Const FOF_CREATEPROGRESSDLG = &H0&
Set Network=WScript.CreateObject("Wscript.Network"
Set fso=WScript.CreateObject("Scripting.FileSystemObject"
Set shell=WScript.CreateObject("Wscript.Shell"
Network.MapNetworkDrive "W:", "\\server1\share$"
ParentFolder="W:\AWBS"
Set objShell=WScript.CreateObject("Wscript.Shell"
set shell=CreateObject("Shell.Application"
set objFolder=shell.NameSpace(ParentFolder)
objFolder.CopyHere "C:\Folder\*.*"_ ,FOF_CREATEPROGRESSDLG
Network.RemoveNetworkDrive "W:"
Dim Network,shell,fso,ParentFolder,objFolder,objShell
Const FOF_CREATEPROGRESSDLG = &H0&
Set Network=WScript.CreateObject("Wscript.Network"
Set fso=WScript.CreateObject("Scripting.FileSystemObject"
Set shell=WScript.CreateObject("Wscript.Shell"
Network.MapNetworkDrive "W:", "\\server1\share$"
ParentFolder="W:\AWBS"
Set objShell=WScript.CreateObject("Wscript.Shell"
set shell=CreateObject("Shell.Application"
set objFolder=shell.NameSpace(ParentFolder)
objFolder.CopyHere "C:\Folder\*.*", FOF_CREATEPROGRESSDLG
Network.RemoveNetworkDrive "W:"
I assume "WinNT" means NT 4.0 rather than NT 5.0 (Win 2000) or NT 5.1 (Win XP). This may explain some of the trouble, along with a possible need for the WSH 5.6 update [italics below are mine]:
"Many of the Shell objects became available in version 4.71 of the Shell. Others are available in version 5.00 and later. This means that on computers running Windows 95 or Microsoft Windows NT® 4.0, the Shell objects are available only if the integrated desktop is installed. Version 4.71 of the Shell is on all Windows 98 computers, and version 5.00 is on all Windows 2000 computers."
The desktop update was only directly made available through the IE 4.x installation, though I know it can be done with IE 5.x's installer if you use Internet Explorer Administration Kit (IEAK) versions of the installer package. The problem is, these can be hard to obtain. I don't think IEAK 5 is available any longer, and I don't know if IEAK 6 contains the desktop update components.
Plus, IEAK requires registration and (free) licensing:
The setup command-line parameters needed are tricky and finicky as well. I don't recommend this route.
The best thing to do might be to locate a regular IE 4.01 (or later IE 4.x) installation package on an old CD or something. Then remove any newer version of IE, install IE 4 and answer Yes when prompted for the desktop update, and finally reinstall a later IE over it.
Sometimes you can find the IE 4.x package on things like Office 2000 CDs (maybe Office 97?) or even old MSN, AT&T, or AOL CDs! Of course the latter may give you a "branded" version of IE on your machine. I keep an old MSN CD around just for reinstalling NT 4.0 when necessary, so I have IE 4.x on hand to complete the job. If you have the TechNet CDs you might find IE 4.x there too, though you might need a really old set.
There was a lot of FUD and other propaganda from the anti-Microsoft camp about IE's place in the Windows operating system around the time of IE 4.x, and it led a lot of people astray. It is also true that Microsoft recommended that when using NT 4.0 Server as a web server you should install IE 4.x but not the desktop update. This seemed to confuse people into avoiding the desktop update for NT 4.0 Workstation as well.
Lots of work for a progress bar. Another good reason to keep machines properly "up to date" though. Maybe one of the other suggestions will work for you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.