Solved

Need help deleting files in Windows 7

Posted on 2014-12-04
8
173 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 52

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 52

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 52

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

920 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

16 Experts available now in Live!

Get 1:1 Help Now