Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!agate!ragu.berkeley.edu!raymond From: raymond@math.berkeley.edu (Raymond Chen) Newsgroups: comp.sys.ibm.pc.misc Subject: Re: mv command Message-ID: <1991May5.033957.3900@agate.berkeley.edu> Date: 5 May 91 03:39:57 GMT References: <49@swatty.UUCP> <12856@uhccux.uhcc.Hawaii.Edu> Sender: root@agate.berkeley.edu (Charlie Root) Reply-To: raymond@math.berkeley.edu (Raymond Chen) Organization: U.C. Berkeley Lines: 20 In-Reply-To: newsham@wiliki.eng.hawaii.edu (Timothy Newsham) Originator: raymond@ragu.berkeley.edu In article <12856@uhccux.uhcc.Hawaii.Edu>, newsham@wiliki (Timothy Newsham) writes: >--BEGIN MV.BAT-- >@echo off >copy %1 %2 >del %1 >--ENDOF MV.BAT-- > >POTENTIAL PROBLEMS WITH QUICK & DIRTY MV: If you spell the second argument wrong, you will find that your source file was deleted. Example: mv importnt.fil c:\long\pathnaem Assuming you meant to type c:\long\pathname, importnt.fil will be deleted with no backup copy anywhere. Moral of the story: Beware of batch files that do no error checking.