Is it any way of deleting files when you are IN the program that generates
it?
That depends on the program. When the program keeps the data file in
an "always locked" state while processing it, you'll encounter some
difficulties. An output of the full path+name of the datafile inside
the titlebar could help to do it using external scripting and system
tools.
Foe instance I have a lot of old xls files some of them now are useless,
and I want to view AND delete them in a simple and fast way
The example you describe is especially easy, because the program has
powerful built-in macro capabilities. I'll give you an explanation on
basis of your example, although it covers a non-free product. The
same concept would apply to freeware with built in scripting. And even
the external scripting I mentioned above would follow similar concepts.
Create a macro inside your template file (personal.xls or such) and
add code to:
1. retrieve path and name of your document
2. close and delete that document
It could look those:
Sub DeleteCurrent()
Dim sFN As String
sFN = Application.ActiveWorkbook.FullName
Application.ActiveWorkbook.Close
Kill sFN
End Sub
Provide a means for quick action by assigning a hotkey to the macro
or by adding it to the toolbar. You may add code to load the next
file if that seems appropriate.
The general approach I mentioned above would be far more difficult.
I'm not in the mood to provide a solution on that, at the moment. ;-)
BeAr