예제 #1
0
        private static void DoWildCardGet(FtpsClient client, string remotePathPattern)
        {
            var remoteDirName     = NormalizeRemotePath(Path.GetDirectoryName(remotePathPattern));
            var remoteFilePattern = Path.GetFileName(remotePathPattern);

            _filesTransferredCount = 0;

            var localDirName = _commandArguments.Count > 1 ? _commandArguments[1] : Directory.GetCurrentDirectory();

            client.GetFiles(remoteDirName, localDirName, remoteFilePattern, EPatternStyle.Wildcard, _options.recursive, TransferCallback);

            Console.WriteLine();
            if (_filesTransferredCount > 0)
            {
                Console.WriteLine("Downloaded files: {0}", _filesTransferredCount);
            }
            else
            {
                Console.Error.WriteLine("WARNING: No files downloaded");
            }
        }