언어

DTSFTPOp 열거형

정의

FTP 작업에 대한 미리 정의된 연산 집합을 나열합니다.

public enum class DTSFTPOp
public enum DTSFTPOp
type DTSFTPOp = 
Public Enum DTSFTPOp
상속
DTSFTPOp

필드

Name Description
Send 0

로컬 컴퓨터의 파일을 FTP 서버로 보냅니다.

Receive 1

FTP 서버의 파일을 로컬 컴퓨터에 저장합니다.

DeleteLocal 2

로컬 컴퓨터의 파일을 삭제합니다.

DeleteRemote 3

FTP 서버의 파일을 삭제합니다.

MakeDirLocal 4

로컬 컴퓨터에 디렉터리를 생성합니다.

MakeDirRemote 5

FTP 서버에 디렉터리를 생성합니다.

RemoveDirLocal 6

로컬 컴퓨터에서 디렉터리를 삭제합니다.

RemoveDirRemote 7

FTP 서버의 디렉터리를 삭제합니다.

예제

다음 코드 예시는 를 생성한 FtpTask후 생성된 후 기본 값을 보여줍니다. 일부 필드는 비어 있으며, 작업이 실행되기 전에 명시적으로 설정해야 합니다. 샘플은 이 열거를 사용하여 의 FtpTask속성을 설정 Operation 하는 방법을 보여줍니다.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  
using Microsoft.SqlServer.Dts.Tasks.FtpTask;  

namespace FTPTask  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Package pkg = new Package();  
            Executable exec1 = pkg.Executables.Add("STOCK:FTPTask");  
            TaskHost th = exec1 as TaskHost;  

            // List the default values of the FTP task  
            // using the Properties collection of the TaskHost.  
            Console.WriteLine("Connection           {0}", th.Properties["Connection"].GetValue(th));  
            Console.WriteLine("DebugMode            {0}", th.Properties["DebugMode"].GetValue(th));  
            Console.WriteLine("ExecutionValue       {0}", th.Properties["ExecutionValue"].GetValue(th));  
            Console.WriteLine("IsLocalPathVariable  {0}", th.Properties["IsLocalPathVariable"].GetValue(th));  
            Console.WriteLine("IsRemotePathVariable {0}", th.Properties["IsRemotePathVariable"].GetValue(th));  
            Console.WriteLine("IsTransferTypeASCII  {0}", th.Properties["IsTransferTypeASCII"].GetValue(th));  
            Console.WriteLine("LocalPath            {0}", th.Properties["LocalPath"].GetValue(th));  
            Console.WriteLine("Operation            {0}", th.Properties["Operation"].GetValue(th));  
            Console.WriteLine("OperationName        {0}", th.Properties["OperationName"].GetValue(th));  
            Console.WriteLine("OverwriteDestination {0}", th.Properties["OverwriteDestination"].GetValue(th));  
            Console.WriteLine("RemotePath           {0}", th.Properties["RemotePath"].GetValue(th));  
            Console.WriteLine("StopOnOperationFailure  {0}", th.Properties["StopOnOperationFailure"].GetValue(th));  
            Console.WriteLine("SuspendRequired      {0}", th.Properties["SuspendRequired"].GetValue(th));  

            Console.WriteLine("--------------------------");  
            // Show how to set a property using the TaskHost Properties.  
            th.Properties["Operation"].SetValue(th, DTSFTPOp.Receive);  
            Console.WriteLine("New value of Operation:  {0}", th.Properties["Operation"].GetValue(th));  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  
Imports Microsoft.SqlServer.Dts.Tasks.FtpTask  

Namespace FTPTask  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim pkg As Package =  New Package()   
            Dim exec1 As Executable =  pkg.Executables.Add("STOCK:FTPTask")   
            Dim th As TaskHost =  exec1 as TaskHost   

            ' List the default values of the FTP task  
            ' using the Properties collection of the TaskHost.  
            Console.WriteLine("Connection           {0}", th.Properties("Connection").GetValue(th))  
            Console.WriteLine("DebugMode            {0}", th.Properties("DebugMode").GetValue(th))  
            Console.WriteLine("ExecutionValue       {0}", th.Properties("ExecutionValue").GetValue(th))  
            Console.WriteLine("IsLocalPathVariable  {0}", th.Properties("IsLocalPathVariable").GetValue(th))  
            Console.WriteLine("IsRemotePathVariable {0}", th.Properties("IsRemotePathVariable").GetValue(th))  
            Console.WriteLine("IsTransferTypeASCII  {0}", th.Properties("IsTransferTypeASCII").GetValue(th))  
            Console.WriteLine("LocalPath            {0}", th.Properties("LocalPath").GetValue(th))  
            Console.WriteLine("Operation            {0}", th.Properties("Operation").GetValue(th))  
            Console.WriteLine("OperationName        {0}", th.Properties("OperationName").GetValue(th))  
            Console.WriteLine("OverwriteDestination {0}", th.Properties("OverwriteDestination").GetValue(th))  
            Console.WriteLine("RemotePath           {0}", th.Properties("RemotePath").GetValue(th))  
            Console.WriteLine("StopOnOperationFailure  {0}", th.Properties("StopOnOperationFailure").GetValue(th))  
            Console.WriteLine("SuspendRequired      {0}", th.Properties("SuspendRequired").GetValue(th))  

            Console.WriteLine("--------------------------")  
            ' Show how to set a property using the TaskHost Properties.  
            th.Properties("Operation").SetValue(th, DTSFTPOp.Receive)  
            Console.WriteLine("New value of Operation:  {0}", th.Properties("Operation").GetValue(th))  
        End Sub  
    End Class  
End Namespace  

샘플 출력:

Connection

디버그모드 거짓

실행 값 0

IsLocalPathVariable False

IsRemotePathVariable False

IsTransferTypeASCII False

로컬패스

연산 0

작전이름

OverwriteDestination False

원격경로

StopOnOperationFailure(참)

정지 필수 거짓

--------------------------

연산의 새로운 값: 1

설명

자세한 내용은 FTP 작업을 참조하세요.

적용 대상