Hi,
I have setup OpenSSH on remote server. I am trying to execute commands on the remote server from my local machine using Plink. Both local and remote server are Windows XP machine.
Though I am able to run commands such as ‘move’, ‘mkdir’ but ‘del’ command is not working.
For example,
Working: plink -ssh -pw xxx user@server cmd.exe /c move g://root//home//test g://somedir plink -ssh -pw xxx user@server cmd.exe /c mkdir H://somedir//temp
Not working plink -ssh -pw xxx user@server cmd.exe /c del "//sample//test//gc//a.txt" Invalid switch - "/".
These are few other syntaxes that I tried:
..... cmd.exe /c del //sample//test//gc//a.txt Invalid switch - "/".
..... cmd.exe /c del "\sample\test\gc\a.txt" Could Not Find C:\Documents and Settings\Gaurav.Chhabra\sampletestgca.txt
..... cmd.exe /c del "/sample/test/gc/a.txt" Parameter format not correct - "sample".
..... cmd.exe /c del "///sample/test/gc/a.txt" Invalid switch - "/".
..... cmd.exe /c del "////sample/test/gc/a.txt" Invalid switch - "/".
..... cmd.exe /c del "//sample//test//gc//a.txt" Invalid switch - "/".
..... cmd.exe /c del "//sample//test//gc//a.txt" /q Invalid switch - "/".
..... cmd.exe /c "del //sample//test//gc//a.txt /q" Invalid switch - "/".
..... cmd.exe /c 'del //sample//test//gc//a.txt /q' Invalid switch - "/".
..... cmd.exe /c "del //sample//test//gc//a.txt" Invalid switch - "/".
..... cmd.exe /c "del /q //sample//test//gc//a.txt" Invalid switch - "/".
..... cmd.exe /c 'del //sample//test//gc//a.txt' Invalid switch - "/".
..... cmd.exe /c 'del \sample\test\gc\a.txt' The system cannot find the path specified.
..... cmd.exe /c 'del \sample\test\gc\a.txt' The system cannot find the path specified.
..... cmd.exe /c 'del \\sample\\test\\gc\\a.txt' The filename, directory name, or volume label syntax is incorrect.
..... cmd.exe /c del '\sample\test\gc\a.txt' The system cannot find the path specified.
..... cmd.exe /c del '\sample\test\gc\a.txt' The system cannot find the path specified.
..... cmd.exe /c del '//sample//test//gc//a.txt' Invalid switch - "/".
Can anyone help me?
Regards,
GC