The Doszip Commander version 2.16 available (Announce)
> I have a question about the tools menu: my "tools" are usually just fast
> "switches" to certain directories. However, this may imply to change both
> the current drive and the current directory - which needs 2 commands with
> MS-DOS command.com ( i.e. D: and then CD \MyFavoriteProject ). Can such a
> sequence be entered in DZ.INI? Or do I need a .BAT file for this?
This may help?:
XX=D:|cd\MyFavoriteProject
Not shore if this is in the documentation (or in the default .INI file) but this should work:
[Directory] ; Directories for Ctrl-[0..9] and Alt-P
00=Doszip &Directory Ctrl-0, %doszip%
01=&Include Directory Ctrl-1, %doszip%\inc
02=&CLIB Directory Ctrl-2, %doszip%\src\crtl
03=&Tools Directory Ctrl-3, %doszip%\src\tools
04=&Project Directory Ctrl-4, %doszip%\prj
05=&Make Directory Ctrl-5, %doszip%\src\make
06=&Document Directory Ctrl-6, %doszip%\doc
07=&Temp Directory Ctrl-7, %TEMP%
Alt-Left/Right is also useful here.
[Edit]
A more dynamic way to save the current directory and restore it later may be implementet like this:
[Tools]
XX=Save current directory, %doszip%\cdpush
XX=Restore directory, %temp%\cdpop
; CDPUSH.ASM--
; Save current directory to %TEMP%\cdpop.bat
.186
.model tiny
.code
org 100h
start: jmp around
_psp dw 0
envlen dw 0
cdpop db 'cdpop.bat',0
@echo db '@echo off',13,10
drive db 'A:'
crlf db 13,10
db 'CD\'
cd db 80 dup(0)
temp db 80 dup(0)
exit: pop dx
push ax
mov ah,9
int 21h
pop ax
terminate:
mov ah,4Ch
int 21h
abort: mov al,3
call exit
db 'Abnormal program termination',13,10,'$'
getcwd: push si
mov si,offset cd
xor dx,dx
mov ah,47h
int 21h
mov ax,0
jc getcwd_end
mov ax,si
getcwd_end:
or ax,ax
pop si
ret
write: mov bx,si
mov ax,4000h
int 21h
ret
strlen: push di
push ds
pop es
mov di,ax
or ax,ax
jz strlen_00
xor ax,ax
cld
mov cx,-1
repnz scasb
mov ax,cx
not ax
dec ax
strlen_00:
pop di
ret
around: push offset abort
xor si,si
mov dx,ds
mov [si+_psp],dx
mov bp,[si+02h]
sub bp,dx
mov es,[si+2Ch]
xor ax,ax
mov bx,ax
mov di,ax
mov cx,7FFFh
cld
startup_envloop:
cmp word ptr es:[di],'ET'
jne startup_nextenv
cmp word ptr es:[di+2],'PM'
jne startup_nextenv
cmp byte ptr es:[di+4],'='
je startup_found
startup_nextenv:
repne scasb
inc bx
cmp es:[di],al
je startup_fail
or cx,cx
jnz startup_envloop
startup_fail:
mov ds,dx
ret
startup_found:
push es
pop ds
mov es,dx
mov si,di
add si,5
mov di,offset cd
startup_loop:
lodsb
or al,al
jz startup_break
stosb
jmp startup_loop
startup_break:
mov ds,dx
mov si,offset cdpop
mov al,'\'
stosb
startup_loop2:
lodsb
stosb
or al,al
jnz startup_loop2
mov dx,offset cd
mov ah,3Ch
xor cx,cx
int 21h
mov si,ax
jc startup_fail
mov ah,19h
int 21h
add drive,al
mov dx,offset @echo
mov cx,18
call write
jc oswrite_error
call getcwd
mov ax,offset cd
call strlen
mov cx,ax
mov dx,offset cd
call write
jc oswrite_error
mov dx,offset crlf
mov cx,2
call write
jc oswrite_error
mov bx,si
mov ah,3Eh
int 21h
xor ax,ax
jmp terminate
oswrite_error:
mov bx,si
mov ah,3Eh
int 21h
mov al,1
jmp terminate
end start
Complete thread:
- The Doszip Commander version 2.12 available - nidud, 20.07.2011, 15:41 (Announce)
- The Doszip Commander version 2.12 available - nando, 24.07.2011, 07:12
- The Doszip Commander version 2.12 available - nidud, 24.07.2011, 16:28
- The Doszip Commander version 2.12 available - nando, 25.07.2011, 16:19
- The Doszip Commander version 2.13 available - nidud, 25.07.2011, 19:37
- The Doszip Commander version 2.13 available - nando, 26.07.2011, 03:31
- The Doszip Commander version 2.13 available - nidud, 25.07.2011, 19:37
- The Doszip Commander version 2.12 available - nando, 25.07.2011, 16:19
- The Doszip Commander version 2.12 available - nidud, 24.07.2011, 16:28
- The Doszip Commander version 2.14 available - nidud, 26.07.2011, 13:41
- The Doszip Commander version 2.14 available - Rugxulo, 29.07.2011, 08:32
- The Doszip Commander version 2.14 available - nidud, 29.07.2011, 14:18
- The Doszip Commander version 2.14 available - Rugxulo, 29.07.2011, 08:32
- The Doszip Commander version 2.15 available - nidud, 27.08.2011, 14:56
- The Doszip Commander version 2.15 available - Japheth, 28.08.2011, 13:26
- The Doszip Commander version 2.15 available - nidud, 28.08.2011, 17:07
- The Doszip Commander version 2.15 available - Japheth, 28.08.2011, 13:26
- The Doszip Commander version 2.16 available - nidud, 28.08.2011, 21:52
- The Doszip Commander version 2.16 available - Japheth, 30.08.2011, 10:47
- The Doszip Commander version 2.16 available - nidud, 30.08.2011, 11:27
- The Doszip Commander version 2.16 available - Japheth, 01.09.2011, 10:22
- The Doszip Commander version 2.16 available - nidud, 30.08.2011, 11:27
- The Doszip Commander version 2.16 available - Japheth, 30.08.2011, 10:47
- The Doszip Commander version 2.12 available - nando, 24.07.2011, 07:12