Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

How to overrite the file if it already exist?

$
0
0

Hi,

I when i am trying to overrite the file which is alredyy exist in the directory i am facing below error

"Can not create the file as it is alredy exist in the path"

i am using below mentioned code

String MvDestfile = Dts.Variables["envclrpbackupdir"].Value.ToString() + Dts.Variables["var_date"].Value.ToString()+ "\\" + Dts.Variables["var_FileName"].Value.ToString();
                    System.IO.File.Move(Dts.Variables["var_move_pathFile"].Value.ToString(), MvDestfile);


Please help to resolve this ASAP.

Thankx in advance


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>