cmd or batch menu with checkboxes

December 17, 2009 at 13:10:48
Specs: windows xp or 7
Here is what Im trying to do, I making a cmd or batch file that copys folders from the cd I made to a folder on the C:\ drive. But there are so many folder that I wanted to make a check box menu so people can just check a bunch of boxes of the folders they want and when they have picked all the folders they want hit a copy button on the menu that then copys over all the folders they have check. I was looking for a program to build the menu but didnt really see anything. Any hints?

See More: cmd or batch menu with checkboxes

Report •


#1
December 17, 2009 at 16:17:31
a whole lot depends on how many folders are involved. If they can be listed on one screen, not too hard. if more than one screenful, you get into a whole lot of dithering around. A simple menu to capture a list of 49 (maximum screenlines on my system at current settings) IMPORTANT: THIS WILL WRITE AN EXECUTABLE FILE CALLED TOP.COM ONTO YOUR HARD DRIVE. all this file does is put the cursor at the top of your screen, but if you're afraid of it, then don't.
as written, this batchfile must exist as: listf.bat

@echo off && setlocal enabledelayedexpansion && goto :aa
f100,109,b6,0,b2,0,b4,02,cd,10,cd,20
rcx
10
ntop.com
w
q
:aa
If exist top.com goto :oo
echo courtesy pause, next step WRITES TOP.COM to system
pause
debug < %0.bat > nul
:oo
set /a screen=49
set /a nn=0
for /f "tokens=* delims=" %%a in ('dir /b') do (
set /a nn+=1
set zz!nn!=%%a)
cls
for /L %%a in (1 1 !screen!) do echo %%a !zz%%a!
top
for /L %%a in (1 1 !screen!) do (
set xx=
set /p xx=
if /i "!xx!" equ "x" set list=!list! !zz%%a!
if /i "!xx!" equ "q" goto :done
)
:done
cls
echo list to be processed:
for %%b in (!list!) do echo %%b


Report •

#2
December 17, 2009 at 17:51:50
I see, that is some nice code but I have a few hundred folder I would like to have each with its own check box. I was hoping to find some type of program to use with the batch or cmd file

Report •

#3
December 17, 2009 at 21:07:32
ya might check out xtree (various versions and morphs). it probably has a lot overhead excessive of your needs however. I tried to locate old version to test it and couldn't find one offhand, but downloads (free) are available (google).
good luck

Report •

Related Solutions

#4
December 18, 2009 at 05:28:49
Were I to do this, I'd use VBScript, with IE as a front end.

Report •


Ask Question