Hi,
I have to rename the file name with both prefix and sufix.
kindly help me out
Thank sin advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeesh MenothPosted Nov 5, 2015, 4:19 AM
Nishant MittalPosted Nov 5, 2015, 3:50 AM
tep 1 : as a first step identify wether the file exists or not before copying the file.
using
File.Exists()methodStep 2: if the file already exists with same name then delete the existing file using
File.Delete()methodStep 3: now copy the File into the new Location using
File.Copy()method.Step 4: Rename the newly copied file.
Try This:
praveen kumarPosted Nov 5, 2015, 3:39 AM
Nishant MittalPosted Nov 5, 2015, 3:34 AM