Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: How can I convert my windows scripts to winSCP scripts

millerintllc wrote:

I also got the same error after running that code. Now WinSCP.com doesn't seem to work. I would like to reinstall but I'm afraid it may lose my saved connections if I do so?

You won't lose your settings, if you reinstall.
millerintllc

Re: How can I convert my windows scripts to winSCP scripts

martin wrote:

As these probable are not WinSCP specific, you should better ask someone who can see the problem on your screen. This way we could hardly solve anything. I'm sorry.


I also got the same error after running that code. Now WinSCP.com doesn't seem to work. I would like to reinstall but I'm afraid it may lose my saved connections if I do so?
martin

Re: How can I convert my windows scripts to winSCP scripts

As these probable are not WinSCP specific, you should better ask someone who can see the problem on your screen. This way we could hardly solve anything. I'm sorry.
Inkster jim

Re: How can I convert my windows scripts to winSCP scripts

Hi Prikryl

When I ran the code you gave me I got a "winSCP is not a valid win32 application"

I also got a "access denied"

Is there a certain location I need to run the batch files from?
Right now the files are 4 layers down. Does it have to be run with the path ie c:\program files\WinSCP script?

Can you give me a step by step process of how I need to do this.
Is a session necessary to do this like it is within the application?

To run the 'run.bat' before I just typed bat. Is that what I do here?
Inkster jim

Re: How can I convert my windows scripts to winSCP scripts

Hi Prikryl,

When I reply I dont see an empty box and I can't add to the stream by typing at the bottom of your post. So I just deleted what was in there and started from the top again, is this right.
martin

Re: How can I convert my windows scripts to winSCP scripts

First, you should read
https://winscp.net/eng/docs/guide_automation

But, anyway:

RUN.BAT

...
echo ----------------------------------
echo Start uploading at %TIME%
echo ----------------------------------
winscp.com /script=putfile.txt
REM Done uploading, now delete the files on the local machine
...

PUTFILE.TXT

option batch on
option confirm off
open sftp://jdoe:jdoe@XXX.XX.XXX.XXX
cd uploads
put helloworld*.txt
exit
Inkster jim

What is the scripting language used in WinSCP?

Is this specifically WinSCP script or SFTP maybe
Arvada Joe

How can I convert my windows scripts to winSCP scripts

Hi folks,

I am brand new to WinSCP. I need to send multiple files to a remote site in a secure ftp. Here are what my current scripts look like:


RUN.BAT

@echo off
REM ------------------------------------------
REM This batch file will run an ftp upload
REM then delete files on the current computer.
REM ------------------------------------------
REM Start the upload
echo ----------------------------------
echo Start uploading at %TIME%
echo ----------------------------------
ftp -s:putfile.txt XXX.XX.XXX.XXX //runs the text file below
REM Done uploading, now delete the files on the local machine
echo ----------------------------------
echo Deleting local files
echo ----------------------------------
del D:\FTP_FOLDER\III to DOR\hello*.txt // deletes the files on my side after the ftp
REM copy over the files on the root to replace the one's just deleted
echo ----------------------------------
copy D:\helloworld*.txt
echo ----------------------------------
echo Upload complete at %TIME%.
echo ----------------------------------

KICKS OFF THIS FILE:

PUTFILE.TXT

jdoe // user name
jdoe // password
prompt
cd uploads
mput helloworld*.txt /files to be trasferred
bye

Thanks!