
One common way of passing information between systems is to use scheduled jobs to copy files between locations. If those locations are on Windows servers in the same network but different domains, a Windows batch file may be the simplest way to do the job. The key is to set up a locked-down account with read privileges in the directory of the source file and use the “net use” command to authenticate on the different domain. With those steps in place, you can call the “copy” command to copy over the source file.
The following commands accomplish this, using the /Y switch to ensure that any existing copy of the file in the local directory gets overwritten without generating a user prompt. To use this code, replace all square brackets and text inside them with the appropriate values as indicated:
net use \\[Remote IP][password] /USER:[domain]\[username]
copy /Y \\Remote IP]\[Path with filename] [Local path including drive]