School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,406 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,660 people online right now. Registration is fast and FREE... Join Now!




Dynamic menu from folder content

 

Dynamic menu from folder content, I saw it somewhere!

Billy885

29 Jun, 2009 - 06:42 PM
Post #1

New D.I.C Head
*

Joined: 29 Jun, 2009
Posts: 4

Hello All,

Before I got registered I saw a link to something like this:

How to create a dynamic menu from the folder contents.

This is the exact text on the link I am looking for: "Batch Dynamic Menu From Folder"

Any help finding the link would be appreciated.

Thanks in advance!

This post has been edited by Billy885: 29 Jun, 2009 - 07:51 PM

User is offlineProfile CardPM
+Quote Post


firebolt

RE: Dynamic Menu From Folder Content

30 Jun, 2009 - 12:51 AM
Post #2

D.I.C Lover
Group Icon

Joined: 20 Feb, 2009
Posts: 5,463



Thanked: 75 times
Dream Kudos: 1675
My Contributions
This isn't the right forum.

* * *

Was the link directed to DIC? Try utilizing the DIC search system.
User is offlineProfile CardPM
+Quote Post

noorahmad

RE: Dynamic Menu From Folder Content

30 Jun, 2009 - 12:54 AM
Post #3

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
What Language are you using.
User is online!Profile CardPM
+Quote Post

Billy885

RE: Dynamic Menu From Folder Content

30 Jun, 2009 - 01:27 AM
Post #4

New D.I.C Head
*

Joined: 29 Jun, 2009
Posts: 4

QUOTE(noorahmad @ 30 Jun, 2009 - 12:54 AM) *

What Language are you using.

I would like to use batch commands for the dynamic menu.

Firebolt,

I figured out where I saw the link, here. It is generated by this site when I came here from google.com using whatever search string I entered that is pertenent to this site. If I am in the wrong forum, please advise.
User is offlineProfile CardPM
+Quote Post

firebolt

RE: Dynamic Menu From Folder Content

30 Jun, 2009 - 01:37 AM
Post #5

D.I.C Lover
Group Icon

Joined: 20 Feb, 2009
Posts: 5,463



Thanked: 75 times
Dream Kudos: 1675
My Contributions
Been searching, these are the best that I could find:
http://www.parsonplace.com/batches.html
http://www.xefteri.com/articles/show.cfm?id=10

Hope it helps, somehow smile.gif
User is offlineProfile CardPM
+Quote Post

Billy885

RE: Dynamic Menu From Folder Content

30 Jun, 2009 - 12:08 PM
Post #6

New D.I.C Head
*

Joined: 29 Jun, 2009
Posts: 4

Thanks Firebolt! I will take a look.
User is offlineProfile CardPM
+Quote Post

Billy885

RE: Dynamic Menu From Folder Content

2 Jul, 2009 - 12:03 AM
Post #7

New D.I.C Head
*

Joined: 29 Jun, 2009
Posts: 4

Thanks firebolt, Those pages helped some but I found all the help I need here: http://www.dostips.com

In case anyone is interested here is what I came up with.
CODE
@echo off
REM.-- Prepare the Command Processor
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION

set fname=%~n0
:redo
cls
set count=1
for %%f in (*.*) do (
    echo.
    echo        !count! - %%f
    set mis!count!=%%f
    set /A count=!count!+1
)
set /A count=%count%-1
echo.
set /P input=Please select or 0 (zero) to exit [1-%count%]:
if %input% == 0 mainmenu.bat&goto:eof
if %input% LEQ %count% goto run
goto return
:run
set runmis=mis%input%
call set run_mis=%%%runmis%%%
echo %run_mis%
echo %fname%
goto:eof
:return
echo wait.bat goes here
echo Sorry improper input, please try again!
pause
goto redo    

Sorry all, this code will give you a menu of file names from any folder you point it to and allow you to pick a file from that menu. Right now it will generate a menu from the current folder.

This post has been edited by Billy885: 2 Jul, 2009 - 11:17 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 10:55PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month