Commands don't execute from batch file but from CMD
Posted: 01 Jun 2021 04:10
I have this batch file that doesn't execute the commands but they work from the command prompt.
It does echo the command on the screen but doesn't run any commands.
Could you tell me what I'm doing wrong and how I can get it to run the commands?
Thanks in advance.
It does echo the command on the screen but doesn't run any commands.
Could you tell me what I'm doing wrong and how I can get it to run the commands?
Thanks in advance.
Code: Select all
echo copy "c:\users\sfd\appdata\roaming\microsoft\excel\xlstart" "d:\sfd\dtsc\admt\office\excel\dt xlstart"
:EXCELTOOLBARS
echo copy "c:\users\sfd\appdata\local\microsoft\office\excel.officeui" "d:\sfd\dtsc\admt\office\excel\toolbars\excel ui\excel ui 2021" |findstr /N /A:4E "^"
:OUTLOOK
echo copy "c:\users\sfd\appdata\local\microsoft\office\olk*.officeui" "d:\sfd\dtsc\admt\office\outlook" | findstr /N /A:4E "^"
:WORDACL
echo copy "c:\users\sfd\appdata\roaming\microsoft\office\*.acl" "d:\sfd\dtsc\admt\office\word\autocorrect acl\acl bu\acl 2021" | findstr /N /A:4E "^"
:WORDDICTIONARY
echo copy "c:\users\sfd\appdata\roaming\microsoft\uproof\custom*.*" "d:\sfd\dtsc\admt\office\word\dictionaries" | findstr /N /A:4E "^"
:WORDTEMPLATES
:normal normal.dotm, normalemail.dotm
echo copy "c:\users\sfd\appdata\roaming\microsoft\templates\normal.dotm" "d:\sfd\dtsc\admt\office\word\normal bu\normal bu 2021" | findstr /N /A:4E "^"
echo copy "c:\users\sfd\appdata\roaming\microsoft\templates\normalemail.dotm" "d:\sfd\dtsc\admt\office\word\normal bu\normal bu 2021" | findstr /N /A:4E "^"
:WORDTOOLBARS
echo copy "c:\users\sfd\appdata\local\microsoft\office\word*.*ui" "d:\sfd\dtsc\admt\office\word\toolbars\word ui\word ui 2021" /d /y /v | findstr /N /A:4E "^"