Here's my setup.
I've got the script like this:
public void Main() { // TODO: Add your code here if (System.IO.Path.GetExtension(Dts.Variables["strSourceFile"].Value.ToString()) == ".xls") { System.IO.File.Move(Dts.Variables["strSourceFile"].Value.ToString(), Dts.Variables["EXCEL"].Value.ToString() + System.IO.Path.GetFileName(Dts.Variables["strSourceFile"].Value.ToString())); } else if (System.IO.Path.GetExtension(Dts.Variables["strSourceFile"].Value.ToString()) == ".xlsx") { System.IO.File.Move(Dts.Variables["strSourceFile"].Value.ToString(), Dts.Variables["EXCEL"].Value.ToString() + System.IO.Path.GetFileName(Dts.Variables["strSourceFile"].Value.ToString())); } else if (System.IO.Path.GetExtension(Dts.Variables["strSourceFile"].Value.ToString()) == ".txt") { System.IO.File.Move(Dts.Variables["strSourceFile"].Value.ToString(), Dts.Variables["TEXT"].Value.ToString() + System.IO.Path.GetFileName(Dts.Variables["strSourceFile"].Value.ToString())); } else if (System.IO.Path.GetExtension(Dts.Variables["strSourceFile"].Value.ToString()) == ".doc") { System.IO.File.Move(Dts.Variables["strSourceFile"].Value.ToString(), Dts.Variables["WORD"].Value.ToString() + System.IO.Path.GetFileName(Dts.Variables["strSourceFile"].Value.ToString())); } Dts.TaskResult = (int)ScriptResults.Success; }
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.