Link to home
Start Free TrialLog in
Avatar of HIBS_ICT
HIBS_ICT

asked on

Show winodws progress bar when copying files

I've had a look around but can't find anything that works, I'm after some VB code that will display the progress window/bar when you delete/copy files in windows?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cup
cup

Are you talking about an HTA or just pure VBScript/WSF?  See if https://www.experts-exchange.com/questions/23075263/How-can-I-show-a-progress-bar-with-a-vbscript.html fixes it for you.
Avatar of HIBS_ICT

ASKER

Rob, I get an error on:
Line 13
Column 0
Error: File not found
Code: 800A0035

What am i doing wrong, im sorry im still learning VB

All files do exist
I take it that would be on this line:
Set objSourceFolder = objFSO.GetFolder(strSourceFolder)

what you need to do is make sure that strSourceFolder and strTargetFolder (both defined at the top of the script) are valid folders.

You can make them, for example,
strSourceFolder = "C:\TempSource\"
strTargetFolder = "C:\Temp\Target\"

Regards,

Rob.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks sw, I did have an extra Next in there....it was left over from a loop I used to have in the code...

BTW, if you're wondering, it the CopyHere method that allows the options, allowing the Progress Bar.
http://msdn2.microsoft.com/en-us/library/bb787866(VS.85).aspx

Regards,

Rob.