为什么要创建临时Word文档? [英] why temporary word documents are created?

查看:107
本文介绍了为什么要创建临时Word文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

foreach (string d in Directory.GetDirectories(webpath))
        {
            foreach (string f in Directory.GetFiles(d, "*.docx", SearchOption.AllDirectories))
            { lstdoc.Items.Add(f.ToString()); }
        }



使用上面的代码,我试图在列表框中列出所有目录和文件,但令我惊讶的是,列表框中列出了一些临时文件.然后我检查了文件夹,但没有这样的文件.它们是如何创建的.期待一个好的解决方案.谢谢.还请对该问题进行补救...



using the above code i am trying to list all directories and files in a list box but to my surprise some temporary files are listed in the list box. then i checked in the folder but there are no such files. how they are created . expecting a good solution. thanks. also kindly give a remedy for the problem...

推荐答案

以下是Microsoft Word创建这些文件的原因的解释:

http://support.microsoft.com/kb/211632 [
Here is an explanation of why Microsoft Word creates these files:

http://support.microsoft.com/kb/211632[^]

Part of the reason is data integrity (keeping the original file but also the changes that you made so if the computer crashes you can either roll back or keep the new changes that haven''t been saved yet).


这篇关于为什么要创建临时Word文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆