Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Location
    Indiana PA USA
    Posts
    9

    Can't get File.Rename to work

    Trying to rename files on the destination system but can't make it work.

    Here's what I'm using in the Post-install phase:

    File.Rename(SessionVar.Expand("%AppFolder%\\Scener y\Eurw\Scenery\HL945060.bgl", "%AppFolder%\\Scenery\Eurw\Scenery\HL945060.FSG")) ;

    It's throwing up an error when I run the installer:

    On Post Install, Line 1: 2 arguments required

    Can some one please point out my error?

    Thanks in advance

    Justin

  2. #2
    Join Date
    Dec 2007
    Location
    Indiana PA USA
    Posts
    9
    No longer getting the 2 arguments error, but this isn't working either:

    File.Rename(SessionVar.Expand("%AppFolder%\\Scener y\Eurw\Scenery\HL945060.bgl"), (SessionVar.Expand("%AppFolder%\\Scenery\Eurw\Scen ery\HL945060.FSG")));

    just need to change the extension on some files.

    Arrghhh (as he beats his head against the wall)

    Justin

  3. #3
    Join Date
    Dec 2007
    Location
    Indiana PA USA
    Posts
    9
    Never mind. My head hurts but finally got this to work:

    File.Rename(SessionVar.Expand("%RenFolder%\\Scener y\\Eurw\\Scenery\\HL945060.bgl"), "%RenFolder%\\Scenery\\Eurw\\Scenery\\HL945060.FSG ");

    forgot my escape slashes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts