Using .Net to rename file
I am calling session.executecommand(mv fileuploaded newfilename);
Any help would be much apprecitated.
Advertisement
Advertisement
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
With FTP protocol this should do:Same pb:
I've got
'MV': command not understood.
Advertisement
Please set Session.DebugLogPath and post the log.
Can you be more specific please? Like posting the exception, including callstack. Also, how do you run the .NET code?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?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.
Advertisement
It should be path to file (e.g. "c:\logs\session.log"), not path to directory.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.
Advertisement
This bug has been added to the tracker:
https://winscp.net/tracker/871
Advertisement
You can post new topics in this forum