DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Using the folder contents of a directory to auto fill an input window  (Read 4,300 times)

questorfla

  • Fighting Slime all the Time
  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
This is a question i have often wondered if there is a proper way to manage.  Given that you have a folder with 20 or more sub-folders in it,each folder-name having no spaces:
When typing input into a query created using the "set /p" command is there a way to make the input field auto-fill the text to match the folder-names in the existing directory similar to how Outlook fills in the email address-field based on names in your contacts (or actually it now uses a special file for this purpose but the results are the same) . 
Each progressive key entered by the user would narrow down the displayed name until it either matched the name of a sub-folder that already existed or if not already there the script would proceed to ask "Create?  (Y)es  (N)o  with the default being NO.

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
Re: Using the folder contents of a directory to auto fill an input window
« Reply #1 on: February 12, 2016, 02:09 AM »
From a purely DOS point of view ... unlikely.

Type in enough so that an entry is uniquely identifiable and then hit TAB and see if it auto-completes.

Otherwise, I suggest start using a simple PowerShell GUI with drop-down selector, for example.
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903

Original address: https://www.donationcoder.com/forum/index.php?topic=42319.0