SET /P rcChrmBXF=
In my batch file, I use a SET /P command to import the. txt files must be on one line and not have a carraige return line feed. Any directory entries are relative to the source path in the robocopy command. In an "Exclude" file for directories you do not use a trailing backslash.
I surround each entry with double quotes and a space between entries.Īn "Include" file can have files or directories, but directories must have a trailing backslash. I preface them with "rc" (for robocopy), then some recognizable notation for the application or part of the file system in the robocopy command, then append "B" or "R" (for Backup or Restore), then "I" or "X" (for Include or Exclude), then "D" or "F" (for Directory or File). My method for naming the files is as follows. I have these files in a subfolder "rcXcludes" under my "Backup" folder. txt files that contain the files or directories I want to include or exclude.