File copying
Encyclopedia
In the realm of computer file management, file copying is the creation of a new file
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

 which has the same content as an existing file.

All computer operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s include file copying provisions in the user interface, like the command, "cp
Cp (Unix)
cp is a UNIX command used to copy a file. Files can be copied either to the same directory or to a completely different directory, possibly on a different file system or hard disk drive. If the file is copied to the same directory, the new file must have a different name to the original; in all...

" in Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 and "copy
Copy (command)
In computing, copy is a command in RT-11, RSX-11, OpenVMS, DOS, OS/2 and Microsoft Windows operating systems. The command copies computer files from one directory to another. The destination defaults to the current working directory. If more than one source file is indicated, the destination must...

" in MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

; operating systems with a graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

, or GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

, usually provide copy-and-paste or drag-and-drop
Drag-and-drop
In computer graphical user interfaces, drag-and-drop is the action of selecting a virtual object by "grabbing" it and dragging it to a different location or onto another virtual object...

 methods of file copying.  File manager
File manager
A file manager or file browser is a computer program that provides a user interface to work with file systems. The most common operations performed on files or groups of files are: create, open, edit, view, print, play, rename, move, copy, delete, search/find, and modify file attributes, properties...

 applications, too, provide an easy way of copying files.

Internally, however, while some systems have specialized application programming interfaces
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 (APIs) for copying files (like CopyFile and CopyFileEx in Windows API
Windows API
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces available in the Microsoft Windows operating systems. It was formerly called the Win32 API; however, the name "Windows API" more accurately reflects its roots in 16-bit Windows and its support on...

), others (like Unix and MS-DOS) fall back to simply reading the contents of the old file and writing it to the new file. This makes little difference with local files (those on the computer's hard drive), but provides an interesting situation when both the source and target files are located on a remote file server
File server
In computing, a file server is a computer attached to a network that has the primary purpose of providing a location for shared disk access, i.e. shared storage of computer files that can be accessed by the workstations that are attached to the computer network...

.  Operating systems with specialized file copying APIs are usually able to tell the server to perform the copying locally, without sending file contents over the network, thus greatly improving performance.  Those systems that have no comparable APIs, however, have to read the file contents over the network, and then send them back again, over the network.  Sometimes, remote file copying is performed with a specialized command, like "ncopy" in MS-DOS clients for Novell NetWare
Novell NetWare
NetWare is a network operating system developed by Novell, Inc. It initially used cooperative multitasking to run various services on a personal computer, with network protocols based on the archetypal Xerox Network Systems stack....

.

An even more complicated situation arises when one needs to copy files between two remote servers.  The simple way is to read data from one server, and then to write the data to the second server. 
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK