Need help deleting files in Windows 7

Posted on 2014-12-04
Last Modified: 2014-12-06
I have a VB.Net program that creates and modifies a MS Excel spreadsheet as the program runs.  Periodically, during development / debugging the VB.Net program, the Excel spreadsheet gets corrupted. What is left is a file that has the correct filename but the filename is preceded by: ~$

When I attempt to delete these files I get the following prompt:
Are you sure you want to move this system file to the Recycle Bin?
If you remove this file, Windows or another program may longer work correctly

I have two questions:
First is it safe to just delete these files?

Second: Could the fact that these files exist be slowing down the restart of my computer.

Ever since I have been testing this VB.Net program, and these corrupted files have been created, I have seen my computer take up to 15 minutes from the time I see "Starting Windows"  until I am prompted for my logon password.

Question by:charlieb01
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 40482135
Hi Charlie,

> First is it safe to just delete these files?

Yes, as long as the actual Excel spreadsheet is not open (which is surely the case for you, since you say that the Excel files are corrupt). I delete them whenever I find them — it's good housekeeping, imo (Word ones, too).

> Could the fact that these files exist be slowing down the restart of my computer.

I doubt it. I would look elsewhere for the slow-down problem.

Regards, Joe

Author Comment

ID: 40482142
Thanks Joe.

Is there a simple way to search for these corrupt files. I mean, will they always be prefixed with: ~$

I'm just wondering, since the timing of the slowdown of a restart is almost exactly around the time I started this program debugging.
LVL 54

Accepted Solution

Joe Winograd, EE MVE earned 500 total points
ID: 40482168
Yes, the ones you're talking about will always have ~$ at the beginning (both Excel and Word). Note that they have the Hidden attribute, so in order to see them, you'll have to tick the radio button in the View tab of Folder Options that says "Show hidden files, folders, and drives". Regards, Joe
Create Professional Looking Email Signatures

Create "Professional HTML Email Signatures" with ease.
7 Day Money Back Guarantee if not 100% Satisfied.
Affordable - Try it out for 7 Days Totally Risk Free.
Installers provided for over 45 Email clients.
Both Windows & MAC Supported.
Highly Recommended!


Author Closing Comment

ID: 40482171
Thanks, Joe.
Eventually I'll get to the root cause of the slow re-start

LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 40482183
You're welcome, Charlie. I just can't imagine that those files are your slow-down problem. They're generally small (and I doubt that you have a gazillion of them). I have two of them going right now — one is for an Excel file and is 165 bytes; the other is for a Word file and is 162 bytes. Good luck finding the performance culprit! Regards, Joe
LVL 70

Expert Comment

ID: 40482479
Those files contain recovery info for unsaved changes. What puzzles me is: What are you doing that is able to "corrupt" Excel files?

Author Comment

ID: 40483545
I did not write the VB program. However, I believe that what may be happening is that the program is terminating while the Excel file is still open (in the background - you don't actually see Excel open while the program is running but the program does populate various cells over the course of operation.
LVL 70

Expert Comment

ID: 40484616
If Excel isn't killed, nothing should happen. The exiting application either leaves Excel open in background, or it is closed together with the application. Obviously the application forgets to close the workbook after saving (and quit Excel).
If you know the workbook name, it is advisable to use another small VB/VBS application to get the corresponding workbook object, and close it and its Excel instance. The GetObject("Full path to workbook") will select that workbook object.

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
OfficeMate Freezes on login or does not load after login credentials are input.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question