Skip to main content
added 15 characters in body
Source Link
DavidPostill
  • 158.5k
  • 77
  • 365
  • 408

I need to run xcopy command. But when I type it with all parameters - xcopy \\<server>.<domain>.com\c$\Users\<user>\Documents\New_ADuser_mustang.ps1 C:\IAM\New_ADuser_mustang.ps1 /C /Y /R,:

xcopy \\<server>.<domain>.com\c$\Users\<user>\Documents\New_ADuser_mustang.ps1 C:\IAM\New_ADuser_mustang.ps1 /C /Y /R

I'm prompted with a question Does C:\IAM\New_ADuser_mustang.ps1 specify a file name or directory name on the target (F = file, D = directory)?

Does C:\IAM\New_ADuser_mustang.ps1 specify a file name or directory name on the target (F = file, D = directory)?

I need to specify that before I run the command, not after that. The command is run as a part of automated daily task, so there is no one who could answer this question.

I need to run xcopy command. But when I type it with all parameters - xcopy \\<server>.<domain>.com\c$\Users\<user>\Documents\New_ADuser_mustang.ps1 C:\IAM\New_ADuser_mustang.ps1 /C /Y /R, I'm prompted with a question Does C:\IAM\New_ADuser_mustang.ps1 specify a file name or directory name on the target (F = file, D = directory)? I need to specify that before I run the command, not after that. The command is run as a part of automated daily task, so there is no one who could answer this question.

I need to run xcopy command. But when I type it with all parameters:

xcopy \\<server>.<domain>.com\c$\Users\<user>\Documents\New_ADuser_mustang.ps1 C:\IAM\New_ADuser_mustang.ps1 /C /Y /R

I'm prompted with a question

Does C:\IAM\New_ADuser_mustang.ps1 specify a file name or directory name on the target (F = file, D = directory)?

I need to specify that before I run the command, not after that. The command is run as a part of automated daily task, so there is no one who could answer this question.

Source Link
Petr Synek
  • 117
  • 1
  • 2
  • 11

How to predefine file/directory parameter to xcopy

I need to run xcopy command. But when I type it with all parameters - xcopy \\<server>.<domain>.com\c$\Users\<user>\Documents\New_ADuser_mustang.ps1 C:\IAM\New_ADuser_mustang.ps1 /C /Y /R, I'm prompted with a question Does C:\IAM\New_ADuser_mustang.ps1 specify a file name or directory name on the target (F = file, D = directory)? I need to specify that before I run the command, not after that. The command is run as a part of automated daily task, so there is no one who could answer this question.