Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i've been working on a project for quite some time. And i want to know how copy and paste works. How does the computer move the file from on location to another. Thank you for ur help
Posted
Comments
Surendra Adhikari SA 7-Jun-13 3:40am    
if you need to study how internally copy and paste command works in computer system .then you should search in Google first for terms like computer architecture,memory structure of a computer etc first.
Tutorial like http://computer.howstuffworks.com/computer-memory4.htm may helpful.
If you want to know how to impliment copy,paste,move etc ioperation in your project then you can clarify your question in detail.

The exact details would depend on the filesystem and operating system you use, but the general idea is that there are two parts to a file on your harddrive:
1. The data that makes up the file.
2. Some information about where the data is located, where the file fits in on the logical directory structure, and so forth.

This means that moving a file is quick and easy - you simply update the logical location - but copying is a bit more involved: you need to create a new file, then read all the data from the old file and write it into the new file.
 
Share this answer
 
Comments
[no name] 7-Jun-13 4:25am    
There is one another point while copying....


Cyclic Redundancy Check (CRC)...
You don't state what language you are using, but in Windows .NET you would use the Clipboard Class[^]. In Win32 (C/C++) there is a set of API functions which do the same.
 
Share this answer
 
thank you for your help. Your answers were really helpful.
The project i'm working on is gonna be like a clipboard where a user could temporarily place files he/she wants to copy and whenever the user wishes to paste what they copied, they simply open up the clipboard and select the particular file that they want to copy.
Any help with it or suggestions on how i could go about it. Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900