is it possible to query the name of the only folder inside my specified folder?
New: Kudu (May 12, 2026), Platform 30.4 (Apr 28, 2026)
1,400+ portable packages, 1.2 billion downloads
PortableApps.com is operating at a loss. Please donate if you can!
Wraithdu made a GetFolderPath.nsh .
https://portableapps.com/node/11936
But it doesn't query folder names :(.
Hmm...
Why do you need to query in the first place?
Insert original signature here with Greasemonkey Script.
Depends what you need here. If you know the name of your folder, then this is all you need -
Otherwise if you need to search -
OutFile test.exe !include LogicLib.nsh !include FileFunc.nsh !insertmacro GetFileAttributes Var searchdir Section StrCpy $searchdir "C:\Program Files" FindFirst $0 $1 "$searchdir\*.*" ${Do} ${If} $1 == "." ${OrIf} $1 == ".." ; do nothing ${Else} ${GetFileAttributes} "$searchdir\$1" "DIRECTORY" $2 ${If} $2 = 1 ; is directory DetailPrint $1 ${EndIf} ${EndIf} FindNext $0 $1 ${LoopUntil} $1 == "" FindClose $0 SectionEnd