My solution for this was to create .txt files that contain the files or directories I want to include or exclude. I have these files in a subfolder "rcXcludes" under my "Backup" folder. My method for naming the files is as follows. 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). I surround each entry with double quotes and a space between entries.
An "Include" file can have files or directories, but directories must have a trailing backslash. In an "Exclude" file for directories you do not use a trailing backslash. Any directory entries are relative to the source path in the robocopy command. The entire contents of any of these .txt files must be on one line and not have a carraige return line feed.
In my batch file, I use a SET /P command to import the .txt file into a variable. I then use these variables for FILES or after /XF or /XD.
For instance, to backup the current user's Chrome profile without copying the entire "Default" folder, I use the following.
rcChromeBIF.txt
"Bookmarks" "Custom Dictionary.txt" "Extension Cookies" "Favicons" "History" "Login Data" "Preferences" "Top Sites" "Visited Links" "Web Data" "Databases\" "Extensions\" "Local Storage\" "Plugin Data\" "User Scripts\" "User StyleSheets\"
rcChromeBXF.txt
"Bookmarks.bak" "ChromeDWriteFontCache" "Cookies" "Cookies-journal" "Current Session" "Current Tabs" "Extension Cookies-journal" "Favicons-journal" "Google Profile.ico" "History Provider Cache" "History-journal" "Last Session" "Last Tabs" "Login Data-journal" "Network Action Predictor" "Network Action Predictor-journal" "Network Persistent State" "Origin Bound Certs" "Origin Bound Certs-journal" "QuotaManager" "QuotaManager-journal" "README" "Secure Preferences" "Shortcuts" "Shortcuts-journal" "Top Sites-journal" "TransportSecurity" "Web Data-journal"
rcChromeBXD.txt
"Application Cache" "Cache" "data_reduction_proxy_leveldb" "Extension State" "File System" "GPUCache" "IndexedDB" "JumpListIcons" "JumpListIconsOld" "Local Extension Settings" "Media Cache" "Pepper Data" "Platform Notifications" "Service Worker" "Session Storage" "Storage" "Thumbnails" "Web Applications"
In the bat file in, say, C:\Backup.
REM ChromeBak.bat
SET chromeprofdir=Google\Chrome\User Data\Default
SET /P rcChrmBIF=<C:\Backup\rcXcludes\rcChromeBIF.txt
SET /P rcChrmBXF=<C:\Backup\rcXcludes\rcChromeBXF.txt
SET /P rcChrmBXD=<C:\Backup\rcXcludes\rcChromeBXD.txt
robocopy "%LOCALAPPDATA%\%chromeprofdir%" "H:\ChromeBackup\%chromeprofdir%" %rcChrmBIF% /E /ZB /COPY:DAT /DCOPY:T /MT:4 /XJ /XF %rcChrmBXF% /XD %rcChrmBXD% /R:10 /W:2 /TBD /NP /V /TS /Log+:"H:\ChromeBackup\ChromeBackup.log"