本文介绍了通过vba和WinSCP.com上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道发生了什么,因为它只是在屏幕上闪烁.但是我在vba中有此代码.

I don't know what is happeining since it's just flashing by the screen. But I have this code in vba.

Shell "H:\Dokument\Avvikelser\WinSCP.com /script=H:\Dokument\Avvikelser\script.txt"

在script.txt中,我有:

In script.txt i have:

open ftpes://USERNAME:[email protected]
put H:\Dokument\Avvikelser\lista.txt /Avvikelser/lista.txt
close

据我了解,我需要ftpes使其变为被动状态吗?

As I have understood it I need ftpes to make it passive?

我什至无法从cmd提示符启动WinSCP

I can't even start WinSCP from cmd prompt

我需要使用cmd样式的解决方案,因为我无法在计算机上安装软件.
脚本结束后不会上传文件.

I need to use a cmd style solution as I can't install software on the computer.
The file is not uploaded when the script ends.

推荐答案

WinSCP.COM 只是 WinSCP.EXE 的控制台界面程序,您需要同时拥有在同一目录中.

WinSCP.COM is only an console interface program for WinSCP.EXE, you need to have both in the same directory.

请参见 https://winscp.net/eng/docs/executables

这篇关于通过vba和WinSCP.com上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 19:43