There's no
.Count
. There's .Count()
extension method. For that you need:
using System.Linq;
.Count
. There's .Count()
extension method. For that you need:
using System.Linq;
.Count
it is not accepted as good code. How do you make it so that .Count
shows up as an option? (see attached image) This may sound like an elementary question but I am not a professional programmer. Just trying to piece things together. Thanks.
int directoriesCount = session.EnumerateRemoteFiles(
sftpFolder, "*.xml", EnumerationOptions.None).Count;
Session.MoveFile
can move a single file only. Indeed, it works with a file mask, but that was never intended and is a kind of a bug. If you want to use a file mask, you should use Session.EnumerateRemoteFiles
and use Session.MoveFile
for each found file.
session.MoveFile("/parcs/download/PNB/*.xml", "/parcs/download/PNB/Processed/");
Message:/parcs/download/PNB/*.xml not found.;
Source:WinSCPnet;
Type:WinSCP.SessionRemoteException;
Base Exception:WinSCP.SessionRemoteException: /parcs/download/PNB/*.xml not found.
at WinSCP.Session.MoveFile(String sourcePath, String targetPath)
at RppGLUpdate.Class1.Main(String[] args).