Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: How to rename directories and computer info Message-ID: <41702@iuvax.cs.indiana.edu> Date: 13 Apr 90 02:44:52 GMT Organization: malkaryotic Lines: 18 - <19580@boulder.Colorado.EDU> grandin@tramp.Colorado.EDU (Keith Grandin): -> 1 - Is there a way to do a real move of files? I would like to -<9065@chaph.usc.edu>, by wilber@sal-sun31.usc.edu (John Wilber): - With one function call, I don't think so, but you should be able to copy - the file to the destination with a temporary name, delete the old file, - and then rename the new one with the filename from the old one. You - should be able to do all of this, including assigning the temporary name - (if I'm correct) with INT 21 BIOS calls. Eeek. Check Interrupt 0x21, function 0x56, "rename file". It does precisely what you want, namely it creates a new directory entry (in the desired subdirectory) and removes the old entry, without touching the file itself. The MSDOS "RENAME" command doesn't make use of this, but various freely-available programs (often called "mv") do. Turbo C's rename() function makes use of this system call. Naturally it can't work across devices.