Solved

Need help deleting files in Windows 7

Posted on 2014-12-04
8
184 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 54

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 54

Accepted Solution

by:
Joe Winograd, EE MVE 2015&2016 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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 54

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 70

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 70

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

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.
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 capability. This will be demonstrated using Windows Live Movie Maker on 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