1

i am using sshj library in my implementation. I am connecting to the Windows box and OpenSSH is installed there. Than i am sending command like: C:\folder1\folder2\aa.bat arguments 1 2 3 and so on

But execution fails.The whole length of my command is 270 characters, but in the p program log I see that command was truncated to 260 characters. Do you know how I can avoid this truncation, looks like it is native Windows problem with MAX_PATH is limited to 260?

rholdberh
  • 475
  • 1
  • 5
  • 19
  • Are you able to execute the same command from the command line directly ? If yes it shouldn't be a Windows problem. Why not create a intermediary batch that executes the commands you need ? This would enable you to bypass the 260 characters limit. – Marged Dec 08 '15 at 16:15
  • Have your tried to specify the path in "NT-style"?: `\\?\C:\folder1\folder2\aa.bat` This is the recommended format for an "extended-length path". – Robert Dec 08 '15 at 16:37
  • @Marged yes from command line it works fine, – rholdberh Dec 09 '15 at 09:02
  • @Robert I have tried to use NT-style path declaration \\?\ but it also doesnt work for me – rholdberh Dec 09 '15 at 09:02

0 Answers0