Writing a simple batch file to back up .xlb file

Adrian1

Board Regular
Joined
Dec 30, 2003
Messages
126
I have written the following batch file to re-instate my default toolbars in excel should my machine go on the blink (thanks to drafter for earlier info!!):-

cd r:\
copy hall02a8.xlb c:\winnt\

when I am in a normal dos window, this works fine and copies the file from my shared drive on the network to my C: drive on this PC. When I run the batch file though, nothing seems to happen. Surely it should work as the commands are exactly the same. Anyone got any ideas?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
1. Need to run from a shortcut (not drag file to desktop).
2. Add the word PAUSE as last line when you hopefully see what is going on.
 
Upvote 0
Knowing that you created the batch file with an ascii editor like Notepad, NOT wordpad so that you don't have control characters in there I would suggest you try using xcopy instead:

xcopy r:\hall02a8.xlb c:\winnt\ /r

This batch file can also be created by typing the following inside of a command prompt window:


copy con fixtoolb.bat
xcopy r:\hall02a8.xlb c:\winnt\ /r
'Ctrl Z'
'Enter'


HTH
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,394
Members
448,957
Latest member
Hat4Life

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