PDA

View Full Version : Rename a file during install



NewsArchive
08-09-2007, 02:08 PM
Hey,
I am trying to figure out to do something in SB6 and can't quite get there.
I have a situation where I am going to install a file default.sys to
%_SB_INSTALLDIR%\system\defaults.sys... this one is fine, but what I would
also like to do is to copy this file to another folder if it doesn't already
exist... ie...

if not exist %_SB_INSTALLDIR%\data\defaults.tps then copy
....system\defaults.sys to ...data\defaults.tps.

I found where I could say NEVER REPLACE a file during installation, but that
will only work if I can change the name of the file during install... ie,
the script editor would show this line...

Install file "c:\fmsidev\nhr\system\defaults.SYS" to
%_SB_INSTALLDIR%\data\defaults.TPS" (Always install) (Never replace)

So is there a way to change the file extension or am I trying to go about
this the wrong way?

TIA,
Lisa Daugherty

NewsArchive
08-10-2007, 01:40 PM
Lisa

You are nearly there

1: Make sure the "copy to" folder already exists
2: After installing your files, use the SB "Copy Files Local" to copy from

%_SB_INSTALLDIR%\system\defaults.sys
to
%_SB_INSTALLDIR%\system\data\defaults.tps

That should get you going.

JohnG

NewsArchive
08-13-2007, 01:49 PM
Thanks John, that seems to be working perfectly!
Lisa