Topic "Script doesn't work in one case"

Author Message
tbohon
[View user's profile]

Joined: 2011-05-04
Posts: 3
Location: Olympia, WA USA
I have over a dozen WinSCP scripts working just fine. However a new one just implemented isn't working properly and I'm out of ideas.

Here is the script code:

Code:

open PGroup
pwd
lcd d:\mywork
lls *.dat
put -nopreservetime -nopermissions *.dat
dir *.dat
exit



The script above is called by this command:

Code:

winscp.com /script=d:\scp_scripts\pgroup.scp


The scp log shows that everything is fine until I get to the 'put' command. Nothing happens and the script quietly and properly terminates.

I can do the transfer manually from the command line using winscp.com and every command works fine. I can do it manually using the GUI and I receive a complaint about permissions but the file transfers.

Any and all ideas and suggestions would be most appreciated - this is making me crazy!!! Shocked

Thanks in advance.

Tom
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Please post a full log file showing the problem.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. For posting extensive logs you may use pastebin or similar application. 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
_________________
Martin Prikryl
tbohon
[View user's profile]

Joined: 2011-05-04
Posts: 3
Location: Olympia, WA USA
While getting the log files Martin requested I stumbled on the fact that the production script, unlike my test script, was running as a different user inside the Windows Scheduler. Although that user and my (personal) user are in the same groups and have the same 'admin level' permissions on the Win2003 Server as soon as I changed the user to my own the script ran correctly. I have a question in to my server engineer now to confirm that the two users have the exact same permissions but I'll bet $$$ that this is the problem.

Anyway, first real test is early tomorrow morning when, under the Windows scheduler, the production script will run 'hands off' with me as the 'owner' of the scheduler entry.

If that doesn't work I'll be back here whimpering a lot ... Wink

Thanks.

Tom
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Please read FAQ:
https://winscp.net/eng/docs/faq_scheduler
_________________
Martin Prikryl
tbohon
[View user's profile]

Joined: 2011-05-04
Posts: 3
Location: Olympia, WA USA
Thanks Martin ... I'll do further research as we start converting all of my 150+ scripts over to the service account since I don't plan on working here the rest of my life anyway ... I hope ... maybe ... if I'm lucky ... Very Happy
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