Hi,
I want to retrieve the content of a folder (about 20k files / folders) and store it in a `n-separated list
I know how to do it within a loop, but I'd like to ask if there is any method that accomplishes the job faster (than a file / folder loop)?
I need only
a.) The file names (with extension but without their path)
b.) The folder names (without their path)
No attributes or anything else...
I'm doing some regexreplace's on that list afterwards...
Faster way to get a folder content?
Re: Faster way to get a folder content?
You can use Everything to create the list,save it to file,use FileRead to put it into a variable and do what you want with it with SplitPath
For example:
FileRead, OutputVar, Filename.txt
Loop,Parse,OutputVar,`n
{
SplitPath,A_LoopField, , Dir, , Name
Names .= Name "`n"
Paths .= Dir "`n"
}
Clipboard := Names "`n______________________`n" Paths
For example:
FileRead, OutputVar, Filename.txt
Loop,Parse,OutputVar,`n
{
SplitPath,A_LoopField, , Dir, , Name
Names .= Name "`n"
Paths .= Dir "`n"
}
Clipboard := Names "`n______________________`n" Paths
Re: Faster way to get a folder content?
Thank you, but using an external application isn't what I really meant by "any method"
Re: Faster way to get a folder content?
If AHK can't read the MFT(Master File Table),then you will not find a faster way that using loop.
I made a txt file containing all of my files and folders on my both hdds(323918 files and 36742 folders)in less than 2 seconds...the program can also be run from command line
I made a txt file containing all of my files and folders on my both hdds(323918 files and 36742 folders)in less than 2 seconds...the program can also be run from command line
Re: Faster way to get a folder content?
ListMFTfiles: NTFS Instant File Search by woxxom https://autohotkey.com/board/topic/7942 ... le-search/
:)
:)
Who is online
Users browsing this forum: Google [Bot], mikeyww and 281 guests