🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #326

Re: How to rename directories and computer info

#326
From: RAMontante
Date: Fri, 13 Apr 1990 02:44
18 lines
1335 bytes
- <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.
Technical Details
Message-ID: <41702@iuvax.cs.indiana.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!iuvax!bobmon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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