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
Roy Guzman
NA
18
2.1k
how to find all files to another destination
Jul 18 2017 10:33 AM
I have a file path pointing to a text file on disk, I want to write the details of every file within c:\temp\ overwriting any exisiting text.
this should be in the format ( "<fullName> : <name>" ) Each file data should be on a new line and teh files of all sub-directories should be included.
here is what I have done so far
public static void WriteAllFileDataToDisk(string filePath)
{
var myfile = filePath.AsFile();
var listoffiles = "c:\\temp\\".AsDirectory().GetFiles(true);
foreach (var y in listoffiles)
{
myfile.WriteAllText("{0} : {1}".FormatWith(y.AsFile().FullName, y.AsFile().Name));
}
}
it is not working correctly. please let know if you can help.
Reply
Answers (
2
)
How to Implement Push Notification in xamarin Form
Check if record exists in DB Mysql c#