Sublime Text 2 Build File - Backslashes

2

I am trying to setup a custom build in Sublime Text 2. I am having difficulty getting the backslashes in the UNC path path below.

When I run this command I always end up with only one
backslash no matter if I use. \\ or \\\\\ or \\\\\\


Build File
{
  "shell": "true",
  "windows": {
    "cmd": ["psexec \\\\remotecomputer -s cmd /c c:\\dir"]
  }
}

Ed Winn

Posted 2012-11-01T14:29:52.237

Reputation: 23

Answers

2

Your command is parsed twice. First time when reading json, and second time - somewhere inside SublimeText itself.

Use four backslashes for each one in the resulting path and you'll be ok:

"cmd": ["psexec \\\\\\\\remotecomputer -s cmd /c c:\\\\dir"]

Vladimir Sinenko

Posted 2012-11-01T14:29:52.237

Reputation: 2 565