autohotkey when looping through files in a folder it only puts the path and the file extension while leaving out the filename

I find that auto hotkey is leaving out the name of a file when looping through the files in a folder here is the code
FileSelectfile, C:\Users\Benjamin\Documents\Nomi's stuff\record quick\*.*, 0, 0
{
Send, {ALTDOWN}f{ALTUP}o

send, %A_LoopFileName%
}

Open in new window

%A_LoopFileName% returns :\Users\Benjamin\Documents\Nomi's stuff\record quick\.mp3
notice in >>>>>>\.mp3 the filename is missing and so does the c at the beginning of the path disappear
like what the h ... is going on I ma using windows 8
Dov_BAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joe Winograd, Fellow&MVEDeveloperCommented:
First, A_LoopFileName is the name of the file (or folder) without the path. A_LoopFileFullPath is the path and name of the file (or folder).

Second, the syntax of the FileSelectFile command is:

FileSelectFile, OutputVar [, Options, RootDir\Filename, Prompt, Filter]

So this line of code is not right:

FileSelectfile, C:\Users\Benjamin\Documents\Nomi's stuff\record quick\*.*, 0, 0

There are two problems with it: (1) The first parameter is supposed to be the name of the variable in which to store the filenames selected. You seem to have made it a wildcard. (2) The first "0" is in the Option param, which is fine — the same as having no Options. But the second "0" is in the RootDir\Filename param, which is certainly not what you want. Regards, Joe
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.