#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;设置输出文件名
TextFile = %A_ScriptDir%\output.txt
;不存在创建新文件;存在,覆盖原文件
FileOpen(TextFile, "w")
;选择文件夹路径
FileSelectFolder, OutputVar
;存储绝对路径名
PathList =
;遍历 OutputVar路径下所以文件夹,输出到文本文件中
Loop, %OutputVar%\*, 2, 1
{
PathList = %A_LoopFileFullPath%`n
FileAppend, %PathList%, %TextFile%
}