[comp.os.msdos.misc] Looking for a "move directory" utility

lane@cs.dal.ca (John Wright/Dr. Pat Lane) (10/06/90)

Hi.  I've collected hundreds of utilities over the years but there's one
that I've been waiting for, been really needing, but have never seen (and
of course have been to lazy to write myself :-).

What I want is something to simply move a sub-directory entry from one
directory to another.  I use RED, originaly from PC-Magasine, for moving
files but it won't touch directories.  RED simply calls a DOS function
(56h, I think) that does all the work...presumably it doesn't like
directories.  To move a directory, not only would you have to move the 
directory entries, but you would have to alter the first block of the
moved directory to change the starting cluster number of the ".." entry.
I've done it with Norton's enough times, it should be possible for a
program to do.

Another way to do it would be to use the method of RED but make it do a
recursive directory sweep (ie. an "/s" parameter).

Surely there must be something out there to do this?  If not, anyone
want to hack it together?

Sorry for the cross-posting, I'm still getting the hang of all these new
groups.

-- 

John Wright      //////////////////     Phone:  902-424-3805  or  902-424-6527
Post: c/o Dr Pat Lane, Biology Dept, Dalhousie U, Halifax N.S., CANADA B3H-4H8 
Internet: lane@cs.dal.ca   Uucp: lane@dalcs.uucp or {uunet watmath}!dalcs!lane

gordon@osiris.cso.uiuc.edu (John Gordon) (10/07/90)

	Well, I think that the 'mv' command in the MKS Toolkit does what you
want.  However, it is not free, but commercial software.  But, perhaps other
versions of 'mv' from PD sources will also work.

jaz@icd.ab.com (Jack A. Zucker) (10/08/90)

In article <1990Oct6.180133.2037@ux1.cso.uiuc.edu>,
gordon@osiris.cso.uiuc.edu (John Gordon) writes:
> 
> 	Well, I think that the 'mv' command in the MKS Toolkit does what you
> want.  However, it is not free, but commercial software.  But, perhaps other
> versions of 'mv' from PD sources will also work.

No, the MKS mv will not move a directory to another path. You can rename the
directory but you cannot perform true directory moves such as the following:

mv /usr/home /

I wish you could do this sort of thing from MKS however. I certainly would
be interested if someone comes up with a utility to do it. With MKS I usually
perform the following inefficient steps:

cp -r /usr/home /
rm -rf /usr/home

Of course it's painfully slow. I want a move that moves only the directory
entries. Of course, I've seen utilities that performed a recursive copy, then
a recursive delete such as the previous example.

-Jaz


| Jack A Zucker	                 {cwjcc,pyramid,decvax,uunet}!jaz@icd.ab.com |
| Allen-Bradley Company, Inc.     or                       ICCGCC::ZUCKER    |
| 747 Alpha Drive                 
| Highland Hts., OH 44143         phone: (216) 646-4668   FAX: (216)
646-4484 | 

kleine@zeus.unomaha.edu (10/08/90)

I use PCTools to do exactly what you want.  You can see your directory 
structure 'graphicaly' displayed.  Then you can 'prun & graft'  branches
(sub-directories) anywhere you want.

ho@hoss.unl.edu (Tiny Bubbles...) (10/08/90)

I seem to recall a package called PicNix residing on Simtel20 which had a
'mvdir' utility.  A plus was that it accepted Unix-style filename wildcards,
such as file[125-9]*doc ...
--
        ... Michael Ho, University of Nebraska
Internet: ho@hoss.unl.edu | "Mine... is the last voice that you will ever hear."

mvolo@uncecs.edu (Michael R. Volow) (10/08/90)

Not sure if you want a utility to move just the files in a directory,
or to move the directory itself. I've seen (and used) several PD 
MV utilities (can E-mail if you're interested).

If however you want to move a piece of subdirectory tree (complete with
files) then you want a prune and graft utility. PC TOOLS and PC MAG
utilities both have such a function.
-- 
Michael Volow, Psychiatry, Durham VA Med Center, Durham NC 27712
919 286 0411 Ext 6933               mvolo@ecsvax.edu

mcc@WLV.IMSD.CONTEL.COM (Merton Campbell Crockett) (10/10/90)

There are several programs that will do what you want.  For example, the
PKZIP/PKUNZIP pair can be used to archive a tree starting at some arbitrary
branch or is it root since it archives all the twigs or root hairs above
or below the starting point.  PKZIP is used to create the archive--the
switches are documented in the help screen--and it will remove the files
and directories that are archived.  Move to the desired directory and use
PKUNZIP to restore the files and directory structure in the new location.

Another program I ran accross years ago was a program called Directory
Maintainer which among its attributes was that it would work on a Tandy 2000
as well as an IBM PC.  As I recall, you could mark all the files in a dir-
ectory and then move them to another directory.  If the directory did not
exist it would create the directory when requested.  The only restriction
that I recall was that only the last directory in the target path could be
non-existent.

Merton

andy@mks.com (Andy Toy) (10/11/90)

In article <1900@abvax.UUCP> jaz@icd.ab.com (Jack A. Zucker) writes:
>gordon@osiris.cso.uiuc.edu (John Gordon) writes:
>> Well, I think that the 'mv' command in the MKS Toolkit does what you want.  
>
>mv /usr/home /  # does not work

This is not always so.  I noticed that it is possible to do this on a
NFS mounted drive on a DOS machine when using PC-NFS.

>I wish you could do this sort of thing from MKS however. I certainly would
>be interested if someone comes up with a utility to do it. With MKS I usually
>perform the following inefficient steps:
>
>cp -r /usr/home /
>rm -rf /usr/home
>
>Of course it's painfully slow.

mv -r /usr/home /

This will work the same as the above, but is still very slow.
I think the `-r' option is a recent addition.
-- 
Andy Toy, Mortice Kern Systems Inc.,       Internet: andy@mks.com
  35 King Street North, Waterloo,       UUCP: uunet!watmath!mks!andy
      Ontario, CANADA N2J 2W9      Phone: 519-884-2251  FAX: 519-884-8861

kevinc@cs.athabascau.ca (Kevin Crocker) (10/11/90)

I seem to remember a "mvdir" utility that was in the PICNIX package of
utilities.  Can anyone verify?

Kevin
-- 
Kevin "auric" Crocker Athabasca University 
UUCP: ...!{alberta,ncc}!atha!kevinc
Inet: kevinc@cs.AthabascaU.CA
-- 
Kevin "auric" Crocker Athabasca University 
UUCP: ...!{alberta,ncc}!atha!kevinc
Inet: kevinc@cs.AthabascaU.CA

roy%cybrspc@cs.umn.edu (Roy M. Silvernail) (10/12/90)

kevinc@cs.athabascau.ca (Kevin Crocker) writes:

> 
> I seem to remember a "mvdir" utility that was in the PICNIX package of
> utilities.  Can anyone verify?

Sure! Here's the help screen....

Name:     mvdir - move a directory
Usage:    mvdir Dir1 Dir2
Version:  3.5 for PCs with DOS 2.1 and higher
          (C) Copyright Peter Stephen Heitman 1986  --  All Rights Reserved
          Distributed with the PiCnix Package (tm) by Peter Stephen Heitman


     Dir1, and all of the files and directories in Dir1, are moved to Dir2.

     If Dir2 already exists, Dir1 is moved to Dir2/Dir1.

     Mvdir will also work in the case where Dir1 and Dir2 are on different
        disks.

     If the first argument is -?, display this description of the program.

--
Roy M. Silvernail |+|  roy%cybrspc@cs.umn.edu  |+| #define opinions ALL_MINE;
main(){float x=1;x=x/50;printf("It's only $%.2f, but it's my $%.2f!\n",x,x);}
"This is cyberspace." -- Peter da Silva  :--:  "...and I like it here!" -- me

ariel@seer.UUCP (Catherine Hampton) (10/14/90)

I just checked the archive PICNIX.ZIP in my files and there is an
"MVDIR.EXE" program included.

Cathy
_________________________________________________________________
Catherine A. Hampton                  BITNET: hampton@reed.BITNET
CIS: 71601,3130                      Fidonet: Cathy H. @ 1:125/32
GEnie: C.HAMPTON3     Internet: hampton@reed.EDU / ariel@seer.COM

umrose05@ccu.umanitoba.ca (Dave Rose) (10/14/90)

ariel@seer.UUCP (Catherine Hampton) writes:

>I just checked the archive PICNIX.ZIP in my files and there is an
>"MVDIR.EXE" program included.

>Cathy
>_________________________________________________________________
>Catherine A. Hampton                  BITNET: hampton@reed.BITNET
>CIS: 71601,3130                      Fidonet: Cathy H. @ 1:125/32
>GEnie: C.HAMPTON3     Internet: hampton@reed.EDU / ariel@seer.COM

So why don't you UUENCODE it and send it out for everybody!!
 
Dave

-- 
Dave Rose                 : Local (UnixWS) - UMRose05@CCU.UManitoba.CA
P.O. Box 403              : Local (Amdahl) - #Rose05@CCM.UManitoba.CA
Winnipeg, Manitoba, Canada: UUCP Node #005 - drose@trash.UUCP
R2M-5H3                   : 

aahz@netcom.UUCP (Dan Bernstein) (10/14/90)

In article <644@seer.UUCP> ariel@seer.UUCP (Catherine Hampton) writes:
>I just checked the archive PICNIX.ZIP in my files and there is an
>"MVDIR.EXE" program included.
>
See also references to 4DOS........... 8-;

-- 

                           --- Dan


Opinions are free.  Go ahead, take one.

ts@uwasa.fi (Timo Salmi) (10/14/90)

In article <1990Oct14.052019.20519@ccu.umanitoba.ca> umrose05@ccu.umanitoba.ca (Dave Rose) writes:
>ariel@seer.UUCP (Catherine Hampton) writes:
>
>>I just checked the archive PICNIX.ZIP in my files and there is an
>>"MVDIR.EXE" program included.
>
>So why don't you UUENCODE it and send it out for everybody!!

                    ********
       ********     DON'T!!!   ************
                    ********

A word of advice just in case you meant posting it here.  Posting
uunencoded material in the news is for moderated binary postings
groups only.  And Picnix is a large package, which would mean a lot
of work, if someone tried to email it individually to all
requesters. 

There is a much better alternative.  Get the picnix utilities from
an ftp site by anonymous ftp or mail server.  At chyde.uwasa.fi,
Vaasa, Finland, 128.214.12.3, we have it (rather them, since there
are 3 parts) in the /pc/pd2 directory.  If you need instructions how
to use anonymous ftp or mail server you are welcome to email me for
prerecorded instructions.  (Include your address as a signature,
since mail paths do not always come out returnable from replying to
a news posting.  If you reside at an "exotic" site, you then have a
better possibility of getting my reply.)

...................................................................
Prof. Timo Salmi        (Moderating at anon. ftp site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun