Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
SQL create directories
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Administrator
21y
4.4k
1
Reply
I have a list of names in my SQL database("Books"), datatable("BookName") that I would like to use to create directories on my computer. The following code work excellent using a .txt file of the book names, however the SQL database has the same identical list of names. I'd like to use the SQL instead of the .txt file approach... Help........... string strSource = (@"C:\bookName.txt"); DirectoryInfo source = new DirectoryInfo(strSource); string strTarget = (@"C:\books\"); DirectoryInfo target = new DirectoryInfo(strTarget); StreamReader sr = File.OpenText(strSource); string read; while ((read = sr.ReadLine()) != null) { target.CreateSubdirectory(read); } sr.Close();
[email protected]
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
ADO: Child DB insert from DataGrid
Need help ASAP