Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!pdn!palan!larry From: larry@palan.uucp (Larry Strickland) Newsgroups: comp.os.msdos.misc Subject: Re: MOVE files, not copy. Message-ID: <1991Mar6.002326.8260@palan.uucp> Date: 6 Mar 91 00:23:26 GMT References: <5yN0X2w163w@cybrspc> <1991Mar4.044236.4842@cs.mcgill.ca> <1991Mar4.141726.713@javelin.es.com> Organization: Palantir Systems, Inc. Lines: 26 In article <1991Mar4.141726.713@javelin.es.com> bgeer%javelin@dsd.es.com writes: >storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes: >>After a rather lengthy search through the MSDOS manual, I still am at a loss >>on how to MOVE files instead of just copying them. > >If you don't have access to the many utilities which will do this, >most languages (certainly TurboC & Turbo Pascal) have a rename() >function or some such...a program can be dashed off which will do the >move without copy/delete. As a person who spent _considerable_ time trying to do this, let me say that it is not as easy as it sound(s)(ed). Sure the rename command is there. Programming it is relatively easy. Then the problems begin... The major one deals with error codes. The documented ones aren't there or don't work (this was Turbo C). When I figured what kind of error code I really got and depended on that, it changed! Apparently there are several ways the MSDOS rename command can fail, and did in my case. I finally gave up, installed 4DOS and used the MOVE command there which works admirably! BTW, it also meant I didn't have to go through atrocities to handle things like mv abc ..\..\xyz which my version of ls still stumbles on! -larry