Tommy Pettersson writes: I wanted to write two scripts named cpto and mvto to have in directory tags, so I could select a file in another directory and B2B1 on mvto/cpto in the target directory's tag to move (or copy) the file to this directory. The needed information about the command window's label is not available in the environment of the scripts, but that could be creeped into the code by passing along an extra argument to run() &co. Does it sound favourable, or is there already a better way to move and copy files with wily? That sounds like a good idea, although there is currently a definitely-not-better way to do what you want in wily: If you put the text ">xargs to . ln" in the tag of the target directory, you can link files thereto by B1-sweeping the file(s) to be linked to, and then B2-sweeping the tag-text. Really, I think consensus was that the ">", "|", and "<" really should run in the directory of their input, not the directory of the command, so if that bug gets fixed, then my trick no longer works and we're back to your original anyhow. Oh, and for what it's worth: # This is a shell archive. # # This archive contains: # # /home/trost/.bin/to # echo x - /home/trost/.bin/to sed 's/^X//' >/home/trost/.bin/to << 'END-of-/home/trost/.bin/to' X#!/bin/sh Xdest="$1" Xcmd="$2" Xshift 2 Xexec "$cmd" ${1+"$@"} "$dest" END-of-/home/trost/.bin/to exit