Click here to Skip to main content
16,020,669 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 20-Dec-11 7:53am
v5

1 solution

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.
 
Share this answer
 
Comments
BobSunndb 20-Dec-11 15:18pm    
I guess that the program will be creating .txt files and write there which sub-folder was zipped. Then, it will check each time this .txt files before zipping.

Thanks for the idea :) Cheers!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900