is it possible to query the name of the only folder inside my specified folder?
New: StressMyPC (Dec 10, 2025), Platform 30.1.3 (Nov 17, 2025)
1,400+ portable packages, 1.2 billion downloads
We're close to breaking even this year, please donate today
December 2025 Site Slowdown Being Addressed
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