如何通过脚本任务在ssis中的特定文件夹中发送文件
how to send file in a specific folder in ssis by script task
我想在 ssis 中使用脚本任务在处理后发送特定文件夹中的文件,我该怎么做?
谢谢你
移动文件应该不成问题。 Take a look at this。您可以将文件的路径作为变量传入。
using System.IO;
string path = (string)Dts.Variables["User::path1"].Value;;
string path2 = (string)Dts.Variables["User::path2"].Value;;
try
{
// Ensure that the target does not exist.
if (File.Exists(path2))
File.Delete(path2);
// Move the file.
File.Move(path, path2);
}
我想在 ssis 中使用脚本任务在处理后发送特定文件夹中的文件,我该怎么做? 谢谢你
移动文件应该不成问题。 Take a look at this。您可以将文件的路径作为变量传入。
using System.IO;
string path = (string)Dts.Variables["User::path1"].Value;;
string path2 = (string)Dts.Variables["User::path2"].Value;;
try
{
// Ensure that the target does not exist.
if (File.Exists(path2))
File.Delete(path2);
// Move the file.
File.Move(path, path2);
}