0
I'm trying to copy a file from Windows to Linux, but I don't know the exact filename (it's a war file from a maven project, so I don't know the current version. My example:
pscp -pw <password> "F:\Maven\jenkins\workspace\<project-name>\target\<project-name>-0.0.1-SNAPSHOT.war" user@192.168.1.132:/var/lib/tomcat8/webapps/ROOT.war
this fails with this error:
pscp: remote filespec /var/lib/tomcat8/webapps/ROOT.war: not a directory
Is there any way to use wildcards, that pscp won't use as a directory?
Thanks
Hi @manjesh23. It didn't work, I'm getting the same error "not a directory". – German – 2016-10-17T15:13:53.423
Can you please help me with full command you are using? – manjesh23 – 2016-10-17T15:15:24.240
My example is the real one. – German – 2016-10-17T15:17:06.270
pscp -pw <password> "F:\Maven\jenkins\workspace\aaa\target\aaa-0.0.1-SNAPSHOT.war" my-user@192.168.1.132:/var/lib/tomcat8/webapps/ROOT.war – German – 2016-10-17T15:17:39.127
Try this: pscp.exe -pw passwd -l uname -sftp "F:\Maven\jenkins\workspace\aaa\target\aaa-0.0.1-SNAPSHOT.war" 192.168.1.132:/var/lib/tomcat8/webapps/ROOT.war – manjesh23 – 2016-10-17T15:19:01.897
Yes, this works fine, but what I'm looking for is to be able to use a wildcar in the source file.
pscp.exe -pw passwd -l uname -sftp "F:\Maven\jenkins\workspace\aaa\target\aaa-*.war" 192.168.1.132:/var/lib/tomcat8/webapps/ROOT.war
– German – 2016-10-17T15:22:29.050Wildcard will not work because you are specifying source wildcard but destination is a file name. Its just like over-writing the destination file. – manjesh23 – 2016-10-17T15:27:11.020
Let us continue this discussion in chat.
– manjesh23 – 2016-10-17T15:28:22.390