Can I copy a non-exe file to a remote machine using PsExec? If you want to know the answer. Read this post carefully. Here it answers the question can PsExec copy file to remote computer.
“I copied and ran an exe file on a different machine using PsExec. Along with adding the xml file to the remote server, I also want to copy the xml file to a distant machine. The command returns an error message informing the user that The system cannot find the file specified. Why PsExec copy file to remote computer access denied?”
-Question from Spiceworks
PsExec is a tool that lets you execute processes on remote systems. It is not designed to copy files across machines, but to copy the program it is going to run remotely. With the specific -c switch, PsExec will copy any local program to the remote computer before execution.
But if you use the -c switch and don’t specify an executable file, PsExec will still copy the file but you’ll receive an error stating The system cannot find the file specified. This happens because PsExec will always attempt to run the file you copy.
In conclusion, it is possible to make PsExec copy file to remote computer, but using PSexec for simply copying the files is pointless, as it is designed for running programs on remote computers.
Anyway, let’s see how to copy file to remote computer using PsExec. Before starting, there are three prerequisites:
Step 1. Download PsExec on the computer that will be running the remote commands.
Step 2. Right-click on the ZIP file downloaded and select Extract All.
Step 3. Open the folder where the extracted file is located. Enter “cmd” in the search box and then press Enter.
Step 4. Then the Command Prompt in that folder will open. You can now run commands through PsExec.
Here's a PsExec copy file to remote computer example. Maybe you want to run an exe file that is located in your local computer’s C: Tools folder on a different computer. Use the following syntax to accomplish this:
If you need to copy files to remote computers before using PsExec, you can use the Copy-Item PowerShell cmdlet instead. Besides, you can also use a more convenient and effective GUI file transfer tool like AnyViewer. Why should you choose AnyViewer among other options?
Step 1. Download, install, and launch AnyViewer 3.0 or above on both Windows computers. If your version is lower, please upgrade first.
Step 2. On the Controller computer, go to Log in, and then click Sign up. (If you already have signed up on its official website, you can log in directly.)
Step 3. Fill in the signup information.
Step 4. Then you can see you successfully logged in to AnyViewer. Your device will automatically be assigned to the account you’ve logged in to.
Step 5. Choose your target computer, and then click File Transfer.
Step 6. Then a File Transfer dialog box will appear. You’re able to transfer files between devices freely by clicking the arrows after choosing the target files. You can also double-click the target file to achieve transfer.
This post primarily introduces how can PsExec copy file to remote computer and how to make PsExec copy file to remote computer. If you would like a more convenient and effective way to transfer files remotely with a GUI, you can use the freeware AnyViewer. With it, you can achieve remote file transfer with ease.