File manager written in bat / cmd script

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
roodyster
Posts: 1
Joined: 03 Jun 2015 02:12

File manager written in bat / cmd script

#1 Post by roodyster » 03 Jun 2015 02:20

I have created a norton-commander style file manager in bat / cmd script.
What do you guys think ? Should i develop it further ?

Script is at: http://www.mediafire.com/download/5zmlu ... atfman.cmd

Aacini
Expert
Posts: 1914
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: File manager written in bat / cmd script

#2 Post by Aacini » 03 Jun 2015 07:24

When I tested your program I got an error message with something like "System.ArgumentOutOfRangeException: The value must be less than the maximum current window size of 39... in parameter height. Current value 43." After some tests, I changed several vertical values to adjust they to my screen by subtracting 5:

- Changed 43 by 38 in "call :screen 120 43 1B"
- Changed 42 by 37 in "call :gotoxy 0 42"
- Changed 39 by 34 in "call :panels 0 0 58 39"
- Changed 38 by 33 in "for /l %%N in (1 1 38) do echo !line[%%N]!"
- Changed 37 by 32 in "call :gotoxy 0 37"

:arrow: You should control all screen positions based on two variables, so a change in the window size can be achieved changing just two lines.

I also had to enclose in quotes the names of the directories in these lines:

- call :getfiles left "%left_dir%"
- call :getfiles right "%right_dir%"

:arrow: You always must enclose path names in quotes.

After that, the program run correctly! :D However, the response to keys is pretty slow... :(


The slowest part in this type of programs is the refresh of the page when the contents scrolls. Some time ago I wrote peek.com auxiliary program that have access to BIOS screen and keyboard functions, so it allows to move the cursor, show text in color, etc. After I added the video scroll functions to it (INT:10:06 and INT:10:07), I started the development of a File Manager program written in Batch that use peek.com capabilities to show text in the screen in a very fast way. The first version of such program is here.

Antonio

Post Reply