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

Posted on 2014-07-14
Last Modified: 2014-07-14
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, %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
Question by:Dov_B
    1 Comment
    LVL 51

    Accepted Solution

    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

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    modThree challenge 4 53
    fizzArray3  challenge 1 48
    commonTwo  challenge 63 72
    Program to display an alert on Windows Toolbar 2 36
    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now