![]() |
#1 |
Junior Member
Join Date: Aug 2009
Posts: 4
|
![]()
Hello.
I want to rename a file during the script execution, but I dont know how. For exemple : code: I search "SetFileName" or "Rename" or "SetBaseName" but I didn't find it. ![]() Could you help me pleaze? Thanks. ![]() |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You didn't look hard enough. Rename is in the manual.
Stu |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Aug 2009
Posts: 4
|
Sorry, I had find the "Rename" function but I understood that it's for Folder.
The good syntax is it? code: Thanks!! ![]() |
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
It works with files and folders.
Stu |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Aug 2009
Posts: 4
|
Thanks
|
![]() |
![]() |
![]() |
#6 |
Major Dude
Join Date: Feb 2007
Posts: 672
|
In your example (installing a file and then rename it) you can also use the /oname from the File command
code: |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Aug 2009
Posts: 4
|
Ok Thanks for the information.
I will try it. ![]() |
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Sep 2012
Posts: 5
|
Hi, I am trying todo something similar, but keep getting an error everytime.
MY folder structure is: Folder1\file.xxx Folder1\file2.xxx Setup\NSISscript.nsi I am using Modern UI(MUI2.nsh), with two option, the first should use file.xxx the other should use file2.xxx, but output file should be file.xxx for both, what I did is: First: SetOutPath "$INSTDIR\Folder1" File /r /x .svn \ /x "..\Folder1\file2.xxx" \ "..\Folder1\*" How do I make the second work? , I tried various variations of: SetOutPath "$INSTDIR\Folder1" File "/oname=..\Folder1\file2.xxx" "file.xxx" But I keep getting the same error showing FILE syntax, any ideas? |
![]() |
![]() |
![]() |
#9 |
Junior Member
Join Date: Sep 2012
Posts: 5
|
no ideas, I failed to explain my problem or such a basic question from someone who clearly fail to understand the manual is beneath you guys
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 462
|
It looks to me like you have the names reversed when you tried to use the /oname switch. The syntax is
oname stands for Output Name.code: |
![]() |
![]() |
![]() |
#11 |
Junior Member
Join Date: Sep 2012
Posts: 5
|
yes, thanks !
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|