Post a reply

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: Using .Net to rename file

There's no date set yet.

Anyway, please set Session.SessonLogPath and post or email me the log. I want to investigate why the key is empty when renaming the file.
mikedovell

Re: Using .Net to rename file

martin wrote:

This bug has been added to the tracker:
https://winscp.net/tracker/871


When will a new release be available to address this issue?

Thanks,

Mike
martin

Re: Using .Net to rename file

Thanks. I was able to reproduce the problem. Will come back to you.
mikedovell

Re: Using .Net to rename file

Here is the debug log from the Call to rename the file. What's strange from the output is that when I just upload a file to the server it uses my public key and once I rename the public key section is empty. Perhaps this is why the server is refusing the command to rename?

[2012-06-04 09:55:07Z] [000a] Scheduling output: [winscp> call rename /incoming/sftptestfile3.tmp /incoming/sftptestfile3.txt]
[2012-06-04 09:55:07Z] [000a] ExeSessionProcess.ProcessInputEvent leaving
[2012-06-04 09:55:07Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:07Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:07Z] [000a] Scheduling output: [Searching for host...]
[2012-06-04 09:55:07Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:07Z] [0009] Output: [winscp> call rename /incoming/sftptestfile3.tmp /incoming/sftptestfile3.txt]
[2012-06-04 09:55:07Z] [0009] Output: [Searching for host...]
[2012-06-04 09:55:07Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:07Z] [000a] Scheduling output: [Connecting to host...]
[2012-06-04 09:55:07Z] [0009] Output: [Connecting to host...]
[2012-06-04 09:55:07Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:08Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:08Z] [000a] Scheduling output: [Authenticating...]
[2012-06-04 09:55:08Z] [0009] Output: [Authenticating...]
[2012-06-04 09:55:08Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:08Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:08Z] [000a] Scheduling output: [Using username "REMOVED".]
[2012-06-04 09:55:08Z] [0009] Output: [Using username "REMOVED".]
[2012-06-04 09:55:08Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:09Z] [000a] Scheduling output: [Authenticating with public key "".]
[2012-06-04 09:55:09Z] [0009] Output: [Authenticating with public key "".]
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:09Z] [000a] Scheduling output: [Server refused to start a shell/command]
[2012-06-04 09:55:09Z] [0009] Output: [Server refused to start a shell/command]
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:09Z] [000a] Scheduling output: [Authentication log (see session log for details):]
[2012-06-04 09:55:09Z] [000a] Scheduling output: [Using username "REMOVED".]
[2012-06-04 09:55:09Z] [0009] Output: [Authentication log (see session log for details):]
[2012-06-04 09:55:09Z] [000a] Scheduling output: [Authenticating with public key "".]
[2012-06-04 09:55:09Z] [0009] Output: [Using username "REMOVED".]
[2012-06-04 09:55:09Z] [000a] Scheduling output: [
]
[2012-06-04 09:55:09Z] [0009] Output: [Authenticating with public key "".]
[2012-06-04 09:55:09Z] [000a] Scheduling output: [Authentication failed.]
[2012-06-04 09:55:09Z] [0009] Output: [
]
[2012-06-04 09:55:09Z] [0009] Output: [Authentication failed.]
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent entering
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessInputEvent entering
[2012-06-04 09:55:09Z] [0009] Exception: WinSCP.SessionLocalException: Element "call" not found in the log file
[2012-06-04 09:55:09Z] [0009] CallstackAndLock..ctor leaving
[2012-06-04 09:55:09Z] [0009] CallstackAndLock..ctor entering
[2012-06-04 09:55:09Z] [0009] Session.DoDispose entering
[2012-06-04 09:55:09Z] [0009] Session.Cleanup entering
[2012-06-04 09:55:09Z] [0009] Command: [exit]
[2012-06-04 09:55:09Z] [0009] ExeSessionProcess.ExecuteCommand entering
[2012-06-04 09:55:09Z] [0009] ExeSessionProcess.ExecuteCommand leaving
[2012-06-04 09:55:09Z] [000a] Scheduling output: [winscp> exit]
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessInputEvent leaving
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvent leaving
[2012-06-04 09:55:09Z] [0009] ExeSessionProcess.Close entering
[2012-06-04 09:55:09Z] [0009] ExeSessionProcess.Close leaving
[2012-06-04 09:55:09Z] [0009] ExeSessionProcess.Dispose entering
[2012-06-04 09:55:09Z] [000a] ExeSessionProcess.ProcessEvents leaving
[2012-06-04 09:55:09Z] [0009] ExeSessionProcess.Dispose leaving
[2012-06-04 09:55:09Z] [0009] Session.Cleanup leaving
martin

Re: Using .Net to rename file

mikedovell wrote:

session.SessionLogPath = "C:\logs" - Throws the exception "141"
session.SessionDebugPath = "C:\logs" - Throws the exception "Access to the path 'C:\logs' is denied."

It doesn't mater which directory that I point those two properties to, I always get those two exceptions. If I use the path ending with a backslash Eg - C:\Logs\ I get an exception that the property is not in the correct format.

It should be path to file (e.g. "c:\logs\session.log"), not path to directory.
mikedovell

Re: Using .Net to rename file

martin wrote:

mikedovell wrote:

martin wrote:

Please set Session.DebugLogPath and post the log.


I get an error that access to the path is denied and I am local admin on this machine. I have tried multiple paths with the same result.

Can you be more specific please? Like posting the exception, including callstack. Also, how do you run the .NET code?


session.SessionLogPath = "C:\logs" - Throws the exception "141"
session.SessionDebugPath = "C:\logs" - Throws the exception "Access to the path 'C:\logs' is denied."

It doesn't mater which directory that I point those two properties to, I always get those two exceptions. If I use the path ending with a backslash Eg - C:\Logs\ I get an exception that the property is not in the correct format.

Thanks,

Mike
martin

Re: Using .Net to rename file

mikedovell wrote:

martin wrote:

Please set Session.DebugLogPath and post the log.


I get an error that access to the path is denied and I am local admin on this machine. I have tried multiple paths with the same result.

Can you be more specific please? Like posting the exception, including callstack. Also, how do you run the .NET code?
mikedovell

Re: Using .Net to rename file

martin wrote:

Please set Session.DebugLogPath and post the log.


I get an error that access to the path is denied and I am local admin on this machine. I have tried multiple paths with the same result.
martin

Vara04 wrote:

Same pb:
I've got
'MV': command not understood.

With FTP protocol this should do:
session.ExecuteCommand("RNFR ...")
session.ExecuteCommand("RNTO ...")

Though I cannot test it atm.
Vara04

Same pb:
I've got
'MV': command not understood.

I try with mv, MV, rename with the same result

2012-05-26 11:46:18Z] [0001] CallstackAndLock..ctor entering

[2012-05-26 11:46:18Z] [0001]   Command: [call MV /TestFTP/AACC.CSV /TestFTP/OUT/AACC.CSV]
[2012-05-26 11:46:18Z] [0001]   ExeSessionProcess.ExecuteCommand entering
[2012-05-26 11:46:18Z] [0003]       Scheduling output: [winscp> call MV /TestFTP/AACC.CSV /TestFTP/OUT/AACC.CSV]
[2012-05-26 11:46:18Z] [0003]     ExeSessionProcess.ProcessInputEvent leaving
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent leaving
[2012-05-26 11:46:18Z] [0001]   ExeSessionProcess.ExecuteCommand leaving
[2012-05-26 11:46:18Z] [0001]   Output: [winscp> call MV /TestFTP/AACC.CSV /TestFTP/OUT/AACC.CSV]
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent entering
[2012-05-26 11:46:18Z] [0003]     Scheduling output: [500 'MV': command not understood.]
[2012-05-26 11:46:18Z] [0001]   Output: [500 'MV': command not understood.]
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent leaving
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent entering
[2012-05-26 11:46:18Z] [0003]     Scheduling output: ['MV': command not understood.]
[2012-05-26 11:46:18Z] [0001]   Output: ['MV': command not understood.]
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent leaving
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent entering
[2012-05-26 11:46:18Z] [0003]     Scheduling output: []
[2012-05-26 11:46:18Z] [0001]   Output: []
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent leaving
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent entering
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent leaving
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent entering
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent leaving
[2012-05-26 11:46:18Z] [0003]   ExeSessionProcess.ProcessEvent entering
[2012-05-26 11:46:18Z] [0003]     ExeSessionProcess.ProcessInputEvent entering
[2012-05-26 11:46:18Z] [0001]   Exception: WinSCP.SessionRemoteException: 'MV': command not understood.
[2012-05-26 11:46:18Z] [0001]   Failed: [WinSCP.SessionRemoteException: 'MV': command not understood.]
[2012-05-26 11:46:18Z] [0001] CallstackAndLock..ctor leaving


Any idea ?
martin

Re: Using .Net to rename file

I was not able to reproduce the problem. For me session.ExecuteCommand("mv ... ...") works.
martin

Re: Using .Net to rename file

Please set Session.DebugLogPath and post the log.
mikedovell

Using .Net to rename file

I am having an issue renaming the files that I transfer. The exact error that I receive is "Element "call" not found in the log file.

I am calling session.executecommand(mv fileuploaded newfilename);

Any help would be much apprecitated.