Max Alexander
Max Alexander

Reputation: 5581

Inno Setup Rename File during packing

I am trying to figure out how to rename a file in the file section while building the setup file. I want to include a Local.config file but extract it as Local.config.tmp I can't figure out why Inno Setup keeps creating folders instead of renaming files. So far I have this, but it keeps creating folders named Api\Local.config.tmp.

Any ideas?

[Files]
Source: "Api\Local.config"; DestDir: "{app}\Api\Local.config.tmp"; Flags: ignoreversion recursesubdirs

Upvotes: 21

Views: 9666

Answers (1)

Deanna
Deanna

Reputation: 24263

It's creating a folder as that's what you told it to do. Try specifying a destination name:

[Files]
Source: "Api\Local.config"; DestDir: "{app}\Api\"; DestName: "Local.config.tmp"; Flags: ignoreversion recursesubdirs

Upvotes: 40

Related Questions