In article <3109@plains.UUCP> lien@plains.UUCP (Craig Lien) writes: ... >2. He had a directory to string program to move a directory anywhere. >I could use a program like that because I have physics class directory >and a common functions directory (i.e. volumes and what not) but I would >like the physics directory to be inside the functions directory. ... I had the same problem of moving things around in your HP28s. You put things where you think they should be and a couple of days later you want to (have to) move it. What I came up with is two programs PACK and UNPACK. PACK takes a list of objects and packs those objects, and their names into another list. If you had the list: { PACK UNPACK } on the stack, then ran the PACK program you would end up with the list: { << code for PACK >> PACK << code for UNPACK >> UNPACK } left on the stack. You then move to the destination directory and run UNPACK to recreate the original variables. Once you have everything UNPACKed then go back to the source directory and purge the originals. UNPACK does its thing by exploding the list to get: << code for PACK >> 'PACK' << code for UNPACK >> 'UNPACK' and then executing the correct number of STO commands. It's not really tricky, but it does work. Checksums for the programs are: PACK 85D5 UNPACK 5DC6 -------------------- Start of PACK and UNPACK -------------------- ;------------------------------------------------------------------------------ ; ;>>> PACK - pack a number of objects that should be packed into a single ; list. PACK will ignore any directories in the list so it ; can be given the output of a VARS command. ; ; Takes one arguments: ; ; v - a list of objects to pack ; ; Returns: ; ; a list that has all the objects packed inside it along ; with those object's names. ; ;------------------------------------------------------------------------------ << { } -> v list << WHILE v SIZE 0 != REPEAT ; as long as there's things to pack v 1 GET ; get a name from the list DUP ->STR DUP SIZE 1 - 2 SWAP SUB ; get objects name as a string "Packing: " SWAP + 1 DISP ; display it pn the first line ; if it's not a directory add it to the list IFERR DUP RCL SWAP 2 ->LIST list SWAP + 'list' STO THEN DROP DROP ; it was a directory, ignore it END v 2 v SIZE SUB ; remove the name of the object we just packed. 'v' STO END list ; return the PACKed list CLMF >> >> ;------------------------------------------------------------------------------ ; ;>>> UNPACK - unpack a list packed by PACK ; ; Takes one argument: ; ; list - a PACKed list ; ; Returns: ; ; all the packed objects in the list recreated in variables ; in the current directory. ; ;------------------------------------------------------------------------------ << LIST-> 2 / IP 1 SWAP ; how many PACKed objects in the list? START DUP ->STR DUP SIZE 1 - 2 SWAP SUB ; get the objects name as a string "Unpacking: " SWAP + 1 DISP ; display it STO ; store the object NEXT CLMF >> -------------------- End of PACK and UNPACK -------------------- TIP: After I've made my list of objects that I want to move ( a lot of times is just a VARS command) before I run the PACK program I do an ENTER to duplicate the name list. I leave it on the stack and when I want to delete the originals I just go back to the correct directory and then use the PURGE command. -- john.Latala@Waterloo.NCR.COM