网络文件夹中有Thumbs.db文件的问题 [英] Problem w/ Thumbs.db files in a network folders

查看:142
本文介绍了网络文件夹中有Thumbs.db文件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个程序(VB.NET),该程序每30分钟自动运行一次.它检查特定的网络文件夹是否存在子文件夹.如果发现有新的子文件夹,它将对其进行压缩并将zip文件夹移动到另一个位置.为了仅一次压缩子文件夹,在成功压缩之后,程序通过添加后缀"F"来重命名子文件夹.问题在于,自动创建的thumbs.db文件阻止了重命名,错误消息指出thumbs.db文件正在被另一个程序使用.我确定该文件是从Windows使用的,并且在一段时间后关闭了连接,我通过一些测试进行了检查:我将图像放置在子文件夹中,然后打开一个以确保thumbs.db生成并运行程序删除子文件夹中的所有文件.当涉及删除拇指文件时,会显示错误消息.等待一分钟左右后,我可以毫无问题地删除文件.

我在网上搜索过,唯一能够找到的解决方案是转到工具">文件夹选项".查看标签页检查不缓存缩略图".但是,这无法为我解决该问题,因为我很伤心,我正在使用一个网络文件夹,该文件夹可从公司中的许多用户访问.对我来说,并不是每台计算机都设置此选项的解决方案.

您是否认为在我的情况下还有其他事情可以做?

谢谢
B

Hello All,

I have a program (VB.NET) that runs automatically each 30 min. It checks specific network folder for the existence of a sub-folders. If it finds that there is a new sub-folder it will zip it and move the zip folder in another location. In order to zip a sub-folder only once, after successful zipping the program renames the sub-folder by adding a suffix "F". The problem is that automatically created thumbs.db files are preventing renaming, error message says that the thumbs.db file is in use by another program. I am sure that the file is used from Windows and the connection is closed after some time, I checked that with few tests: I am placing images in the sub-folder I open one to make sure thumbs.db is generated and the run the program to delete all files in the sub-folder. When it comes to deleting the thumbs file gives me the error message. After waiting a minute or so I am able to delete the file with no problem.

I searched the net and the only solution that I was able to find is to go to Tools>Folder Options<> View Tab & check the "Do not cache thumbnails". However, this wont solve the issue for me because as I sad I am working with a network folders which are accessed from many users across the company. For me is not a solution to go to each computer and set this option.

Do you think that there is something else that could be done in my case?

Thanks
B

推荐答案

我在网上搜索过,唯一能找到的解决方案是转到Tools> Folder Options<>.查看标签页检查不缓存缩略图".但是,这对我来说并不能解决问题,因为令我难过的是,我正在使用一个网络文件夹,该文件夹可供公司中的许多用户访问.

这就是组策略的目的.只要将您的计算机加入ActiveDirectory,您就可以创建策略以将其关闭,并且所有计算机都将采用该策略,因此您不必亲自访问每台计算机.

重命名目录的一种方法是维护要重命名的目录列表,然后每隔一段时间尝试重命名它们.自动检查新文件夹并将其压缩的代码也必须检查此列表,以便它不会尝试将已经处理过的相同文件夹压缩为ZIP.
I searched the net and the only solution that I was able to find is to go to Tools>Folder Options<> View Tab & check the "Do not cache thumbnails". However, this wont solve the issue for me because as I sad I am working with a network folders which are accessed from many users across the company.

That''s what Group Policy is for. So long as your machines are joined to ActiveDirectory, you just create the policy to turn it of and all the machines will pick up the policy so you don''t have to visit every machine yourself.

An option for renaming the directory is to maintain a list of directories to be renamed, then try to rename them every so often. Your code to automatically check for new folders and zip them up will also have to check this list so it doesn''t try and ZIP up the same folders up that it already handled.


这篇关于网络文件夹中有Thumbs.db文件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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