static void Main(string[] args)
{
int a=0000001;
for (int i=0; i <= 5; i++)
{
File.Copy(@"C:\SR\30758668.pdf", @"C:\SR\"+a+"_30758668.pdf",true);
a++;
}
Console.WriteLine("\nSuccessful");
Console.ReadLine();
}
I’ve written above program to copy 1 file 5 times with leading string.
like this file 30758668.pdf should be created as 0000001_30758668.pdf,0000002_30758668.pdf`,0000003_30758668.pdf` like wise.
now its creating files with 1_30758668.pdf and 2_30758668.pdf I don’t want this way.
I’m not getting where to convert to integer or string?
And
intdoes not have formatting; 01 is the same as 1 is the same as 00000001 – they are all just 1.Use: