Solved

Need help deleting files in Windows 7

Posted on 2014-12-04
8
170 Views
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.

Thanks,
Charlie
0
Comment
Question by:charlieb01
  • 3
  • 3
  • 2
8 Comments
 
LVL 51

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
0
 

Author Comment

by:charlieb01
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.
0
 
LVL 51

Accepted Solution

by:
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
0
 

Author Closing Comment

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

Charlie
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 51

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
0
 
LVL 68

Expert Comment

by:Qlemo
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?
0
 

Author Comment

by:charlieb01
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.
0
 
LVL 68

Expert Comment

by:Qlemo
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.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Code enhancement 5 13
Windows 7 lost password...(reset vs change) 5 35
Make a border less form movable 2 14
Making an alias 7 54
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

746 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now