Reputation: 103
if FileCopy(ExpandConstant('{tmp}\SPECTRUMJOBS_Data.MDF'),
ExpandConstant('C:\Program Files\Microsoft SQL Server\MSSQL11.LOGISTICS\MSSQL\DATA\SPECTRUMJOBS_Data.MDF'),
False) then
I tried the above one but I am not able to copy because there is no folder named DATA in the location.
so please help me to copy the DATA folder and the file
Upvotes: 0
Views: 481
Reputation: 21045
To force creation of directories you can use (text is from InnoSetup help):
Prototype:
function ForceDirectories(Dir: string): Boolean;
Description:
Creates all the directories along the specified directory path all at once. If the first directories in the path do exist, but the latter ones don't, ForceDirectories creates just the ones that don't exist. Returns True if successful, False otherwise.
InnoSetup documentation is at ishelp
Upvotes: 3
Reputation: 4704
You answered yourself. If there is no folder DATA in folder MSSQL, the folder must be created first. And... if there is no folder MSSQL in folder MSSQL11.LOGISTICS, that folder must be created first. And so on... Now read the above sentences in reverse order, and you're done.
Upvotes: 0