-1

I am trying to create a batch file that auto moves some files and creates folders for an installation.

I want to copy 4 .ocx files in the installer folder to C:\Windows\syswow64, when I try running

robocopy "Folder\comctl32.ocx" "C:\Windows\syswow64"

I get the error: ERROR 123 (0x0000007B) Accessing Source Directory C:\temp\Parent\Folder\comctl32.ocx\ The filename, directory name, or volume label syntax is incorrect.

This directory and file does exist though?

What I want the command todo is move all 4 of the files in this folder to that folder in Windows.

What I want the command todo is move all 4 of the files in this folder to that folder in Windows.

1 Answers1

0

robocopy C:\temp\Parent\Path C:\Windows\syswow64 remove the \ from the end C:\temp\Parent\Folder\comctl32.ocx\ cause you are naming a specific file - add /E to end of the command to move all files in the Path folder

command robocopy C:\Parent\path C:\destination\path /E

use this command if you want to create the folder:

robocopy C:\Parent\Folder C:\destination\path /E /MKDIR

it checks if folder does not exist then it creates it

This CODE if you want to move just the .ocx files:

robocopy "C:\Parent\Folder" "C:\destination\path" *.ocx /MOV
Mike
  • 114
  • 3