Copy a file from an autoexec macro

D

Duncan Edment

Is there a way to create an Autoexec macro, that will
check for the existence of a file, in a specified
location, and if it is not there, copy the file from
another location into the desired location?

i.e. d:\progs\data\config.cfg is the file required. So,
check for it's existence and if it's not there, copy the
following file, d:\progs\data\backup\config.cfg, into the
location above.

Simple!?!? ;)

Thanks & regards

Duncan
 
A

Arvin Meyer

Why bother looking for it? Just use a batch file to copy it.

xcopy "d:\progs\data\backup\config.cfg" "d:\progs\data\config.cfg" /y

You can run the batch file from an autoexec macro by using the RunApp
action, or from the computer's startup folder, or using the Windows
scheduler.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
D

Duncan Edment

Cheers Arvin. That'll do nicely.

Duncan

--
Newsgroups are like one big sandbox that all of us
UseNet kiddies play in with peace & harmony.

Spammers, Cross-Posters, and Lamers are the
people that pee in our big sandbox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top