Topic "put command not working all the time"

Author Message
ncklly
[View user's profile]

Joined: 2015-01-07
Posts: 1
Location: Idaho
Hello,
I searched for help to this in forum, but did not see this exact problem so pardon me if I missed it. When I run this file from a dos prompt it works just fine.
c:\WinSCP.com /script=myFile.txt

here is what is in myfile.txt
option echo off
option batch abort
option confirm off
open sftp://101-05:??????@sftp.????????.com
put -nopermissions -resumesupport=off -nopreservetime \folder\folder\408921_20150107154000.txt
close
exit

If an unattended process runs it like a task schedule or batch file or a c++ program shelling out to a dos prompt or I have tried just about everything it never really does or 'put's anything, I can see it connect, but the put just zooms right passed and does nothing, but if I run it from a dos prompt as above I can see it do everything. It is like my put is not working.

Any ideas? Thanks so much
WinSCP V5.5.1(build 3970)
Windows 7
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Please read FAQ:
http://winscp.net/eng/docs/faq_scheduler

If that does not help, come back and attach a session log file.

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Guest




prikryl wrote:
Please read FAQ:
http://winscp.net/eng/docs/faq_scheduler

If that does not help, come back and attach a session log file.

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.


The log really helped, thank you, but here is the problem I am having.
. 2015-01-19 02:28:41.927 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM:
. 2015-01-19 02:28:41.927 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
* 2015-01-19 02:28:41.947 (EOSError) System Error. Code: 2.

* 2015-01-19 02:28:41.947 The system cannot find the file specified
. 2015-01-19 02:28:41.947 Asking user:
. 2015-01-19 02:28:41.947 File or folder '\Nick001\File\408921_20150119154000.txt' does not exist. ("System Error. Code: 2.

. 2015-01-19 02:28:41.947 The system cannot find the file specified")
< 2015-01-19 02:28:41.947 Script: File or folder '\Nick001\File\408921_20150119154000.txt' does not exist.
< 2015-01-19 02:28:41.947 Script: System Error. Code: 2.

So I must have this line wrong.
put -nopermissions -resumesupport=off -nopreservetime \Nick001\File\408921_20150119154000.txt

Do I need the drive letter indication like for example
put -nopermissions -resumesupport=off -nopreservetime d:\Nick001\File\408921_20150119154000.txt

Thank you
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Quote:
Do I need the drive letter indication like for example
put -nopermissions -resumesupport=off -nopreservetime d:\Nick001\File\408921_20150119154000.txt

Depends on what your local working directory is. I could tell that from a log, had you attached it.
Anyway, using an absolute path can only improve this, so it's worth trying.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License