I would like to create something similiar with a streamwriter into a file:
robocopy "\tsclient\A\Steam\steamapps\common\Arma 3!Workshop@RHSAFRF" "D:\A3_S4@RHSAFRF" /MIR /R:0 /W:0 /COPY:DAT
But i cannot do that, since it throws an error if i use \ in the string. Is there any way to do this?
CodePudding user response:
Whenever you want to use escape characters in s string, append their values with an '@' like this @"C:\Users\Folder\file.txt"
. That'll make the compiler ignore the escape characters.
That being said, I'll encourage you to make Google searches and check documentation before creating new questions on StackOverflow.
Happy Coding.