通过MVC应用程序扫描文件。 [英] Scanning files through MVC application.
本文介绍了通过MVC应用程序扫描文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以指导或提供任何有关此项目的示例项目。
矿山需求是我需要扫描应用程序mvc最初扫描文件,然后将该文件保存在db中。
提前致谢。
< b>我尝试了什么:
twain打印应用程序我试过,但需要一些工作应用程序示例供参考
Hi,
Can anyone guide or provide any sample project regarding this.
Mine requirement is this i need an scanning application in mvc which initially scan file and then save that file in db.
Thanks in advance.
What I have tried:
twain printing app i have tried, but need some working application sample for reference
推荐答案
string dirPath = @C:\; //你的文件目录路径
string filter =*。*; //如果你想要任何特定的类型在这里给它。例如:* .txt
string [] files = Directory.GetFiles(dirPath,filter);
foreach(文件中的字符串文件)
{
//读取文件并在DB中保存内容的逻辑
}
string dirPath = @"C:\"; // your directory path for files
string filter = "*.*"; // if you want any specific type give it here. ex: *.txt
string[] files = Directory.GetFiles(dirPath, filter);
foreach (string file in files)
{
// logic to read file and save content in DB
}
这篇关于通过MVC应用程序扫描文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文