Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need help deleting files in Windows 7

Posted on 2014-12-04
8
Medium Priority
?
197 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
[X]
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
8 Comments
 
LVL 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
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 55

Accepted Solution

by:
Joe Winograd, EE MVE 2015&2016 earned 2000 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

Author Closing Comment

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

Charlie
0
 
LVL 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
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 71

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 71

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Suggested Courses

715 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