I I prepared a simple c# script that can rename a file on my local directory. When I run it in visual studio it completes successfully and rename the file. the code below;
public void Main()
{
// TODO: Add your code here
string path = @"D:\DataFiles\IQVIAData\BrickWeekly\BrickWeeklyData\201226_FACT_ALL_SALES_147.txt";
string path2 = @"D:\DataFiles\IQVIAData\BrickWeekly\BrickWeeklyData\ASD.txt";
File.Move(path, path2);
Dts.TaskResult = (int)ScriptResults.Success;
}
From SSMS when I execute the SSIS package which script task included, it runs and it says succesfully completed but the file is still with the same name and it didn't rename the file.
Here what I did before texting here,
- I gave permission to folder for everone to modify (full control; read,write...) (İt didn't work)
I created a SSIS proxy which refers my admin account and run the script instead sql server agent. (It didn't work)

I changed the folder path randomly which does not exist like that path. When I run it visual studio gave error like; there is no folder with this name etc... This was what I expect it. After that I deployed the package to
sql serverand run the package fromSSMS. But it didnt give me any error despite there is a mistake with folder path. It runs succusfully.public void Main() { // TODO: Add your code here string path = @"D:\DataFiles\IQVIAData\BrickWeekly\BrickWeeklyData\201226_FACT_ALL_SALES_147.txt"; string path2 = @"D:\DataFiles\IQVIAData\BrickWeekly\asdasd\ASD.txt"; File.Move(path, path2); Dts.TaskResult = (int)ScriptResults.Success; }
Any ideas or advice to solve my problem?

