Basic Batch Script Question?

I’m trying to copy a file from a directory that has spaces on it, do I need to use special syntax with quotes around it?
The below is my attempt at copying the file from A to B and then running regsvr32 on it to patch a broken file on our systems. Can someone help me correct this? It’s to copy the file to C:\Windows\system32 and then register it.
@ECHO OFF
copy G:\ISD\Public\ASD\aands\Media Player known problems\msdxm.ocx to C:\Windows\System32\
C:
cd windows\system32
regsvr32 msdxm.ocx

Tags: , , ,

One Response to “Basic Batch Script Question?”

  1. richardu says:

    Enquote the path, containing spaces.
    copy “G:ISDPublicASDaandsMedia Player known problemsmsdxm.ocx” C:WindowsSystem32

Leave a Reply