When trying to upload a file to FTP I always fail. Using following configuration:
#connect ftp
open ftpes://...
#copy file
put .\\..\\Java\\WebApp\\target\\PROD-*.zip /project/produktion/
#clean exit
exit
But when I use following configuration it works:
#connect ftp
open ftpes://...
#copy file
put C:\\svn\\project\\branch\\Java\\WebApp\\target\\PROD-*.zip /project/produktion/
#clean exit
exit
Know one could say just switch to GIT and you will have less problems. Nice try but that's something I can't control.
Now I already had a look at WinSCP web site but I could not find any answer.
How can I use relative path to upload the file? Is it possible to use relative paths? Is there any workaround?
Update / Additional information:
My current project structure on SVN looks kind of this:
Project
|
+-- java
| |
| +-- myproject
|
+-- script
| |
| +-- deploy.cmd
| +-- winscp.script
|
+-- tools
| |
+ |-- winscp
I am not happy with it because now WinSCP will be included in each branch. But it seems to be the only way to enable deploy.cmd script to run properly using WinSCP.
My deploy.cmd look kind of this
@echo on
set pathX=.\..
@echo svn update
svn update %pathX%
@echo mvn build PL
call mvn -f %pathX%\Java clean install
@echo uploading FTP
.\..\tools\winscp\winscp.com /ini=nul /script=winscp.script
@pause
And my winscp.script like this
#connect ftp
open ftpes://......
#upload file
put .\\..\\..\\Java\\myproject\\target\\*.zip /myproject/
#clean exit
exit
But still it can not find the file.