ROBOCOPY - Incorporate to excel VBA

Motestfilter

New Member
Joined
Aug 6, 2019
Messages
13
Hi,

I am thinking of incorporating the ROBOCOPY with excel since I am doing a lot of file transfers. I just have no idea where to start. I would like to be able to enter a source and destination path into a cell then maybe some radio button or any kind of selection depending on what specific switch I want to enable. After inputting the paths and selecting the switch it could either create a .bat file to run it or run the command directly to the CMD window.

ROBOCOPY has a pretty simple syntax -
Code:
 [FONT=Fixed, monospace][COLOR=#454545]ROBOCOPY "sourcepath" "destinationpath" [switches] [/COLOR][/FONT]

So basically it is running command line that was generated in excel to the CMD window.

Any direction would be helpful. Thanks!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,216,434
Messages
6,130,609
Members
449,584
Latest member
c_clark

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top