Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!munnari.oz.au!uhccux!wiliki!newsham From: newsham@wiliki.eng.hawaii.edu (Timothy Newsham) Newsgroups: comp.sys.ibm.pc.misc Subject: Re: mv command Message-ID: <12856@uhccux.uhcc.Hawaii.Edu> Date: 5 May 91 01:44:23 GMT References: <49@swatty.UUCP> Sender: news@uhccux.uhcc.Hawaii.Edu Reply-To: newsham@wiliki.UUCP (Timothy Newsham) Organization: University of Hawaii, College of Engineering Lines: 45 Sometimes the most easiest and quickest solutions elude us. A simple batch file can make a great mv command. Just create a batch file with the following lines: --BEGIN MV.BAT-- @echo off copy %1 %2 del %1 --ENDOF MV.BAT-- For you less sophisticated MS-DOS users who want a mv command, do the following: First, get into the directory with DOS in it. Then do the following: C>copy con mv.bat @echo off <- type exactly this copy %1 %2 <- type exactly this del %1 <- type exactly this ^Z <- type F6 and RET, NOT ^Z C> <- MS-DOS will write to disk, you now have a mv command! All wildcard and other MS-DOS filename and filepath conventions apply to your new mv command. EXAMPLE OF USE: C>mv DUMMY.FIL .. <- moves DUMMY.FIL into next higher directory POTENTIAL PROBLEMS WITH QUICK & DIRTY MV: Since mv copies the file(s) you want mv'ed, you will need empty disk space equal to the length of file(s) to be moved. Of course, this used disk space will be returned to you after execution of the mv since the old copy of the file(s) are deleted after copied to the new directory. Oh, by the way, this quick and dirty mv command is in the public domain, although you can send donations to: JUST KIDDING.... Enjoy.