It's much more difficult than I thought. To escape backslash, click on filename character mapping box and put "+"(without quote) next to backslash. Then use this:
Copy files to folder: D:\
File naming Template: $Replace($Replace(<Path>,+,\),$Left(<Path>),2),)$Replace(<Filename>,<.Ext>,)