Why is copying files locally on a remote machine so slow? - performance

Let's say I have \machinename\dll. I open \machinename in Windows Explorer and do a copy/paste on the dll folder to make a backup copy of it so there will be a "dll - Copy" folder in \machinename. It's horrendously slow. I hear that Windows actually copies the folder/files to my local computer then copies them back. Why?
We can use RDP to remote into the server to make the changes, but I really don't like using RDP within another RDP session when I am connected via VPN from home.
Why can't the remote server know I am trying to copy a file and just do the copy locally on its end rather than copying everything to me just so I can copy it back?
ANSWER!
http://computer-vet.com/weblog/2008/01/28/remote-command-line-on-windows.html
I tested it and it works awesomely. It's like remote desktop for command prompts. WIN!

What a human conceptually thinks of as a "copy function" is performed by a program. By initiating the copy function from your local computer, the program is run on your local computer. It then reads each file and folder from its current location, and writes it to the destination location. The copy program doesn't know and doesn't care whether the source and/or destination are local or remote. The data flow in your case is thus:
[remote disk] -> [network] -> [local RAM] -> [network] -> [remote disk]
The copy is so slow, because all of the data has to be sent over the network twice.
If the program had been programmed to detect a remote->remote copy, and perform that more efficiently, it would be faster - alas it wasn't.
But you're already aware of the solution: turn the "network copy" into a "local copy" by starting the copy function on the machine where the files are stored.

http://computer-vet.com/weblog/2008/01/28/remote-command-line-on-windows.html
I tested it and it works awesomely. It's like remote desktop for command prompts. WIN!

Try using another shell-commander (like, total commander or other ...commander) at remote moshine. Or you can try to copy file/dir not with shortcut ctrl+c/v but with mouse dragging (for copy press shift also).

Related

How to Automate Copying Files From a Remote Computer?

I am working on a remote computer that has a very restricted network, it doesn't allow driver mounting, has no internet acess, and so on.
I can only copy files to my local computer using the converntioal way of copy and paste (press ctrl C on the file in the remote computer and then press ctrl V in my local coputer).
Is there a way to automate this process in windows? I need to keep copying files for a couple of days.
Can use mstsc that should be the intranet. Consider FTP Server?

Working on Xcode project on multiple computers

I currently have my project stored on my laptop but I also occasionally want to work on it on my desktop. (Both have Xcode installed). If I connect my laptop to my desktop so that I can access my laptop's files from my desktop, is it safe to simply open the files and edit, or are there hidden files deep in my computer that will get messed up? If this isn't a good idea, are there ways to work on Xcode projects from another computer?
If I connect my laptop to my desktop so that I can access my laptop's files from my desktop, is it safe to simply open the files and edit
Yes. But I don't know what you mean by "open the files". The only thing you should ever open from the Finder is the Xcode project. That being said, there's absolutely no bar to opening an Xcode project located on another volume. (I do it all the time.)
Moreover, a project folder is usually a self-contained world, so there's no issue with copying the whole folder to another machine, working on it there, and copying it back.
Still, the soundest and simplest approach (as long as you'll always have Internet access) is to get yourself a remote git repository and use it to synchronize the work done on different machines. That way, you avoid the "connect my laptop to my desktop" part of the story entirely.

Sync Linux directory with Windows network path

I have a scenario where I have to sync a Linux directory and a windows network path.
For now I'm doing this in two steps
pscp for copying the file from the Linux machine to my local windows machine.
xcopy for copying the file from my machine to the desired windows network path.
All I'm looking for here is is there a way to sycn the Linux directory with the windows network path.
I'd recommend you use WinSCP for this task. When using it as a GUI it's a great tool, but crucially, it can also be automated with ease. Here is a formal guide on how automation works and here is a tutorial video showing how it works in practice with a batch file.
You basically want to copy what the guy in the video did, by making a script to log into your remote server and perform a local synchronization. Any other options, such as choosing to mirror, and how to compare existing files, can also be adjusted by looking at the docs.

How to copy files on a CMD on LAN (windows xp)

hello I don't know about this but I found this on Internet cafe but I don't have enough knowledge on how .bat files works, So I want to know how to copy files like this display.
And the files is already shared so that I can copy. All PC don't have password. Just directly log-in to desktop.
Input location to copy: \\PC1\Steam\Steam\SteamApps\common\dota 2 beta
Input location to paste: D:\Games\Steam\SteamApps\common\dota 2 beta
then it will alert me if done. The files will be overwrite and paste all data.
I don't know the code of copying too and I search too many still cant understand. I just want to use this on my internet cafe so that I don't update games anymore on every PC. Because copying on directly network is my costumer don't know.
Copy -y "source" "destination".
With the quotes if there are spaces in the path. Also, if copy does not want to copy from the network unc, then first connect to the unc using "net use".

Easy way to lock a file on a remote machine (windows)?

I've tracked down an error in my logs, and am trying to reproduce it. My theory is that a file sometimes gets locked in a specific folder, and when the application (ASP.NET) tries to delete that folder it hangs.
I don't have the application running on my own machine so I'm debugging this on a remote server. But for the life of me, I can't seem to figure out a way to lock a file that prevents it from being deleted by the process.
My first thought was to map the network path to a local drive and just leave a command prompt open to that folder. Locally that always fouls up my folder deletes, but apparently SMB is a bit more robust and doesn't grant me a lock.
After that I created an infinte loop vbscript in the folder and executed it remotely. The file was deleted out from underneath the executing code. Man!
I then tried creating a file on the server in that folder and removing all permissions. That didn't do the trick. I don't have access to the IIS settings so perhaps it's running under a privileged system account.
So: what's a program that you know is free and I can quickly use to create an exclusive lock on a file so I can test my delete theory? Like a really, really bad Notepad clone or something.
:-)
Can't you just create a text file from a network folder and open it with MS Word/VS or a similar program which locks it during editing?

Resources