Link to home
Start Free TrialLog in
Avatar of fruitloopy
fruitloopy

asked on

VBScript to determine drive letter, copy all files and folder and show a progress bar

I am looking for some VBScript that will be run from a USB memory stick.

Its first job is to discover what the drive letter of the USB memory stick is. The script will be copied to several different makes of USB drives so it cannot be determined by make/model, etc.

The second job it to copy all the files and folders within 1 directory on the USB memory stick to a location on the host PC.
Copy X:\Builds\Build1 C:\Temp\Build1
(where X = the discovered drive letter)

The third job is to show an accurate progress bar during the copying.

Thanks
Avatar of Cashpanda
Cashpanda
Flag of United States of America image

You can set static drive letters for removable devices such as a USB drive in Computer Management under Storage > Disk Management.

You can use modified VBS file/folder copy script tailored to that drive letter.
I would start here with a template:
computerperformance.co.uk

You could set this script to run as a scheduled task, or manually run it as needed.

As for a detailed progress bar, it does not exist in windows.
We all want it. Microsoft refuses to deliver.
Avatar of Bill Prew
Bill Prew

Can you be more specific about what files will need to be copied to the host PC?  Are they all in one folder, are there subfolders, is it a list of files, etc?

~bp
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 fruitloopy

ASKER

Thanks Rob, that works great.
No problem. Thanks for the grade.

Rob.