Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Oops.. found the error, of course it was my fault,. A " Sign had disappeared!
:oops:
Jobe

Update:. Somehow the texteditor added carrier return.

However a new error had occurred, see screenshots
Jobe

Hi

Sorry for the long delay.

Actually when I run the bat file or just opens winscp and displays the winscp> prompt
Nothing more happens, until I wrote exit, and then the bat file continued and displayed error messages for the rest of the command in your line...
Open is not an internal, external or program ... So the commands are not transferred into winscp

Attaching screenshot (Swedish)
martin

Re: need help in scripting an short transfer script that I'm to stupid to handle by my self..

Use a full path to the winscp.com, like:

"C:\Program Files (x86)\WinSCP\WinSCP.com" /command ...
Guest

Re: need help in scripting an short transfer script that I'm to stupid to handle by my self..

martin wrote:

"moves the download": Where should it move the downloads to? Upload them somewhere?

Regarding the %F and %D:

If you call a batch file in the uTorrent like this: upload.bat "%D" "%F"; then in the batch file, you can pass the information to the WinSCP like:

@echo off

set DIR=%1
set FILE=%2

echo Uploading %DIR%\%FILE%

winscp.com /command ^
    "open ..." ^
    "put ""%DIR%\%FILE%"" ""/remote/path/""" ^
    "exit"


(not tested)


well that didn't work, not a DOS command the system replied.
Jobe

Yeah, sorry I forgot that.

After the download it should put the files to my sftp site.

I've read something about you must use the /parameter to relay the file and folder information to the script..

And you have written all in a bat file. Now I'm more confused.

I've successfully created a script where it connects and login to the sftp server, so that part works.
martin

Re: need help in scripting an short transfer script that I'm to stupid to handle by my self..

"moves the download": Where should it move the downloads to? Upload them somewhere?

Regarding the %F and %D:

If you call a batch file in the uTorrent like this: upload.bat "%D" "%F"; then in the batch file, you can pass the information to the WinSCP like:

@echo off

set DIR=%1
set FILE=%2

echo Uploading %DIR%\%FILE%

winscp.com /command ^
    "open ..." ^
    "put ""%DIR%\%FILE%"" ""/remote/path/""" ^
    "exit"


(not tested)
Jobe

need help in scripting an short transfer script that I'm to stupid to handle by my self..

Hi

I need a little help with writing a short script.
I've tried a bit but my dyslexia and ADHD isn't s very good combination when you need to search and combine information from different sources.

The problem should be easy, but not for me.

I need to via uTorrent function "to execute a command after each torrent is finished" that winscp moves the download(s) (using the -delete function) but I can't get a grasp about it.
I have no idea how to get winscp to transfer the information from uTorrent (%D for directory and %F for single file torrents) to the scrip file, and how to make the bat file to know if it's a single file or directory (and transfer the information to winscp)

Just thinking of this makes my head spinn like the exorcist ....