Amudhan Kuppan

Amudhan Kuppan

  • NA
  • 378
  • 29.9k

I Have one doubt for Classic ASP.net

Feb 26 2018 4:16 AM
Hi,
iam Amudhan,
I have one doubt please rectify it i send one document please note the path i have only one file so i give full path (ie) c:/images/sdfd.jpg suppose i have got lot of files what can i do ? 
why iam asking because iam loaded only file name into sql server without path.  
 
string path = @"C:\images\sdfd.jpg";
string FileName = path.Substring(path.LastIndexOf(((char)92)) + 1);
Console.WriteLine("Full File Name: " + FileName);
string[] allFiles = Directory.GetFiles(this.Variables.ImportFilesDirectory.ToString());
foreach (string currentFile in allFiles)
{
this.Output0Buffer.AddRow();
Output0Buffer.FilePath = currentFile;
Output0Buffer.FileName = FileName;
}
 

Answers (1)