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: unable to get the total file count details from the directory and sub directory.

Please attach a full session and debug log files showing the problem (using the latest version of WinSCP).

To generate the log files, set Session.SessionLogPath and Session.DebugLogPath. Submit the log with your post as an attachment. You may want to remove and data you consider sensitive, 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.
sbrsb86

unable to get the total file count details from the directory and sub directory.

$session.ExecuteCommand("ls -l").output

the above mentioned code gives me error.

##Error##
PS F:\abc> $session.ExecuteCommand("ls -l")
Exception calling "ExecuteCommand" with "1" argument(s): "Element session@0 already read
to the end"
At line:1 char:1
+ $session.ExecuteCommand("ls -l")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException