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
File manager written in bat / cmd script
Moderator: DosItHelp
Re: File manager written in bat / cmd script
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"
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%"
You always must enclose path names in quotes.
After that, the program run correctly! 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
- 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"
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%"
You always must enclose path names in quotes.
After that, the program run correctly! 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