how to use xcopy to append to a file in remote machine? - windows

I am using psexec to connect to remote windows machine and xcopy to copy few files and run the batch files present in remote machine. However the xcopy overwrites the contents of the file in the remote machine. How to use xcopy or something similar to append to files in the remote windows machine?
Or is it possible to copy a file from remote windows machine to local using xcopy or similar?
Note : the remote machine is windows and not running either ftp or any other service.
Thanks
Nohsib

Have a look at Robocopy - http://ss64.com/nt/robocopy.html
It is the Windows equivalent of Rsync.

You could try PowerShell 2.0 remoting. Should fit most of your needs.

Related

Transfer files from one server to another using batch script

I have certain files in a folder on my local machine (Windows 8) and I want to transfer them to a remote server (Windows server 2012 R2) using a batch script.
Shown below is the script that I am trying to run but it throws an Invalid drive specification error. Note: I am sure that there is a folder called test in the specified location.
map.bat
xcopy /-y C:\Users\ssubburathinam\Documents\map1\*.* \\192.168.1.11\C:\Users\ssubburathinam\Desktop\test\ /d /c /y
pause
Screenshot of error
I do not know where to put my login credentials in this script as the remote server has login enabled. How can I accomplish this?
I recommend you to use the "Add a network location" in the main computer, so you can see a new drive letter with the network location. For your try, it might be wrong the share name on the remote computer, if you share a folder, usually is called by:
\\IP_or_name_of_the_remote_server\shared_name

obtain a full remote file size from a running remote process using command line tools

I need to get the filesize of a remote executable file which its process is running on a remote xp machine.
it must be done from a Windows system using only a batch file and only from a command line.
sigcheck.exe cannot be used because it does not take control over remote files.
I can not even map the remote disk to do that.
Hope someone have a good solution.
thanks in advance.

Copy file from FTP site to NFS share in Windows

We have setup a NFS share(//191.232.xx.xxx/export/share) in windows and mapped to Z:. Now we need copy a file from FTP server to Z:. When we try following it works
Z:\> (share NFS)
ftp server.com
ftp>get text.file
Above copies the file to Z:\text.file
But if I try try with UNC path, it don't work
ftp>get text.file //191.232.xx.xxx/export/share/text.file
I'm using windows native FTP and NFSCLIENT. The windows version is 2008 R2 sv1
You need to edit your registry and add an entry to disable the check on UNC paths.
HKEY_CURRENT_USER
\Software
\Microsoft
\Command Processor
Add "DisableUNCCheck" (This is a 'DWORD (32-bits) value').
Set it to hexadecimal value "1".
Now restart your environment and have another go, this should do the trick!

How to invoke a remote vbs file from local machine?

I have copied a .vbs file to a remote machine which inturn invokes a local application.
Please suggest a way to invoke the remote vbs from the local machine.
I tried with wmi. I need to have UI
I know that this is an old post, but based on what you're saying, psexec from PsTools should do the trick.
You would use it in the following format:
psexec \\remote -u remoteuser -p password c:\scripts\script.vbs
For full information on psexec, see this TechNet article.

Windows: running a process on a remote machine

How can I launch a program on a remote windows machine, so that it uses the remote's machine processor and ram.
details:
i have mapped another computers folder to a local drive. in this folder i want to launch an exe via a windows batch file so that it uses the remote computers ressources and not the local ones.
Use sysinternals (now on microsoft) PsExec.
http://technet.microsoft.com/en-us/sysinternals/bb897553
As far as I know, You can't launch an exe on a remote machine unless you are logged into that remote machine in some way. Either by Remote Desktop Connection or through some shell.

Resources