ssam
18th June 2008 10:33 UTC
get a filename or direktoryname
is it possible to get a directoryname or filename, if you only knows the path of the parent Directory?
for Example:
d:\rootdir\parentdir\searchedDir
- in parentdir is only searchedDir, but i dontknow the name of searchedDir or searchedDir kan have a name, which i dont know at this time an i need the searchedDir as a String
Red Wine
18th June 2008 12:22 UTC
Here comes what you're looking for:
http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.2
ssam
19th June 2008 06:07 UTC
thx thats what i need
ssam
19th June 2008 09:58 UTC
Function test
.
.
.
Var /global reportstruts_Path
${Locate} "${copiedfiles_Path}\Reportstruts" "/L=D /M=*strut*" "found"
SetOutPath '$Tomcat_Path_to_Verify\WEBAPPS\$reportstruts_Path'
File /r '${copiedfiles_Path}\Reportstruts\${reportstruts_Path}'
Strcmp $TestDB_checked '1' 0 apache_tomcat_noTestDB
SetOutPath '$Tomcat_Path_to_Verify\WEBAPPS\$reportstruts_Path${TestDB}'
File /r '${copiedfiles_Path}\Reportstruts\${reportstruts_Path}${TestDB}'
FunctionEnd
Function found
; $R9 "path\name"
; $R8 "path"
; $R7 "name"
; $R6 "size"
StrCpy $reportstruts_Path '$R7'
FunctionEnd
I want copy a Directory, in 1 parent Directory with 2 different Directorynames which contains the string of the copied Directory
Example:
From:
d:\copiedfiles\Dir_27
To:
e:\Tomcat 4.1\webapps\Dir_27
and
e:\Tomcat 4.1\webapps\Dir_27_test
and with locate i get the name from the Directory, because the name can be different.
for _test i have the Variable ${TestDB} which is a global define in the installer
The Problem is, that the Installer says "-> no files found."
Is there a other solution for the Problem.
ssam
19th June 2008 11:00 UTC
actually, this is my horrible solution, but i want to improve it
Var /global reportstruts_Path
${Locate} "${copiedfiles_Path}\Reportstruts" "/L=D /M=*strut*" "found"
SetOutPath '$Tomcat_Path_to_Verify\WEBAPPS' #\$reportstruts_Path'
File /r '${copiedfiles_Path}\Reportstruts\reportstruts*.*'
#Messagebox MB_OK "reportstruts_path:$reportstruts_Path"
Strcmp $TestDB_checked '1' 0 apache_tomcat_noTestDB
SetOutPath '$Tomcat_Path_to_Verify\WEBAPPS\tmp'
File /r '${copiedfiles_Path}\Reportstruts\reportstruts*.*'
rename '$Tomcat_Path_to_Verify\WEBAPPS\tmp\$reportstruts_Path' '$Tomcat_Path_to_Verify\WEBAPPS\$reportstruts_Path${TestDB}'
rmdir '$Tomcat_Path_to_Verify\WEBAPPS\tmp'