A quickie tech tip for Windows users… I have to admit, this was a new one to me and I’ve been using Windows  since 3.1. I’m kind of embarrassed by not already knowing this. 

I was recently working on a project which required me to be working on two different machines – my development machine, and the second local machine which had access to the remote server where I needed to deploy the changes. What this meant was that I would work on some code, then swivel in my chair to look at the other monitor with other keyboard/mouse, and either drag’n'drop the affected files to the remote server again or copy-then-paste the file again. 

The whole process is slightly annoying, but nothing too terrible. One of my coworkers and I were discussing a different matter the other day and I was working on this project while he and I talked. As he watched what I was doing he asked “Why don’t you just copy the file once again then just keep pasting it after you update it?” Um… because I didn’t know that would work? I suppose I should have, though. 

See, I know that when you typically move files in Windows you don’t REALLY “move” the data to a new location on the hard drive. The system merely grabs a reference to the file and then, in the case of a “move”, will merely flag where that data should now be logically accessed in your drive’s directory structure. But it doesn’t actually move the bits somewhere new. The same is true for copying from one location to another, whether the destination is on a local or remote machine over a network drive. If you “copy” the file, you will store the reference to the file’s location. If you paste, the system will at that time go get all data contained within the file and copy it to the new location. What this means is that you can keep changing the source location without having to re-copy it after every change – on each paste, Windows goes and grabs the full contents from the source before actually writing data to the new location. 

I guess you do learn something new every day.

3 Responses to “Reference to a Pointer”

  1. #1 modeps says:

    Hi Dave.

  2. #2 modeps says:

    Hey. What’s going on?

  3. #3 Inmake says:

    Весьма..

Leave a Reply