home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
m
/
msh_ut11.zip
/
WILDRUN.MSH
< prev
Wrap
Text File
|
1992-04-30
|
3KB
|
65 lines
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|| A rather complete wildrun. Take current cmdline, interpret some
|| patterns and replace them with certain fileparts and do this for
|| all selected files. Jens Pirnay
|| Parm Desc Normal example
|| ---- ---- -----------------
|| &f full file name c:\dos\thing.dat
|| &d directory only c:\dos
|| &n file name only thing.dat
|| &r file name root thing
|| &e extension exe
||
(cmd( | only if cmdline is not empty
cmd wld_pattern! | store it
(current.selected | loop over all selected files
(
current.name wld_name! | create necessary parts
current.name "." cutfirst wld_ext! | from filename
wld_root! |
cwd current.name makename wld_full! |
wld_pattern | push original pattern on stack
"_" & | add one char, so that a final &_ is recognized
("&f" cutfirst dup (dup)if) | [top+1] part before, [top] after or empty
(wld_full swap & &)
while
("&d" cutfirst dup (dup)if) | [top+1] part before, [top] after or empty
(cwd swap & &)
while
("&n" cutfirst dup (dup)if) | [top+1] part before, [top] after or empty
(wld_name swap & &)
while
("&r" cutfirst dup (dup)if) | [top+1] part before, [top] after or empty
(wld_root swap & &)
while
("&e" cutfirst dup (dup)if) | [top+1] part before, [top] after or empty
(wld_ext swap & &)
while
"_" cutlast drop | remove last dummy character
execute
)if
)loop_panel
refresh
cmd.clear
)if
)wildrun! || connected to AltZ for me
("Wildrun Actions"
" Select the files you want to process, then
type the command and finally press AltZ.
Then this command will be executed against
all selected files.
Following patterns are valid in the command
line:
Parm Desc Normal example
---- ---- -----------------
&f full file name c:\\dos\\xcopy.exe
&d directory only c:\\dos
&n file name only xcopy.exe
&r file name root xcopy
&e extension exe
(e.g. \"copy &n &r.bak\" makes a backup of all
selected files)
"message)wildhelp! || connected to CtrlZ for me
|| wildhelp