TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Akshay
NA
82
47.1k
problem in log maintain (store only 1st file name)
Nov 20 2014 12:46 AM
in my physical folder i retrieve all fill name and now store it in myfile.txt
my problem is if in my folder i have 2 files so it store 1st file namein myfile.txt
than 2nd time it read 2nd file name and again open myfile.txt and write file name on 1st line,
that time 1st file name override with 2nd file name
here is my code=>
string subPath = row["DocPathOnDIsk"].ToString();
string physicalPath = @"D:\New folder\documents to be uploaded\";
string fullpath = Path.Combine(physicalPath, subPath);
string[] fileNames = Directory.GetFiles(fullpath);
foreach (var s in fileNames)
{
File
.
WriteAllText
("
myfile
.
txt
", s);
Console.WriteLine(s);
Console.ReadLine();
}
in above code
File.WriteAllText
(it open file and overide all times)
so is there in any other method for maintain multiple file name in single file without override .........
Reply
Answers (
0
)
how to give the date picker limits for year,date,month
COmboBox in datagrid