Re: When running a script remote directory changes to my documents on its own
One possible explanation is that you have a stored session called
You should use
See https://winscp.net/eng/docs/scripting#configuration
See also https://winscp.net/eng/docs/faq_environment
If this does not help, please attach a full session log file showing the problem (using the latest version of WinSCP).
xx:xx@xx.net
(or similar) in WinSCP GUI on that machine, which has that directory configured as the default local one.
You should use
/ini=nul
commandline switch to isolate the script from the configuration to avoid these kind of issues.
See https://winscp.net/eng/docs/scripting#configuration
See also https://winscp.net/eng/docs/faq_environment
If this does not help, please attach a full session log file showing the problem (using the latest version of WinSCP).
To generate the session log file, use
/log=C:\path\to\winscp.log
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.