private static void DoWildCardPut(FtpsClient client, string localPathPattern) { var localDirName = Path.GetDirectoryName(localPathPattern); var localFilePattern = Path.GetFileName(localPathPattern); _filesTransferredCount = 0; string remoteDirName = null; if (_commandArguments.Count > 1) { remoteDirName = NormalizeRemotePath(_commandArguments[1]); } client.PutFiles(localDirName, remoteDirName, localFilePattern, EPatternStyle.Wildcard, _options.recursive, TransferCallback); Console.WriteLine(); if (_filesTransferredCount > 0) { Console.WriteLine("Uploaded files: {0}", _filesTransferredCount); } else { Console.Error.WriteLine("WARNING: No files uploaded"); } }