Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Is there a way to kill all files in a folder?

i do not want to kill the subdirectory or folder. ( It is an IE cache file
and I just want to go in and clean up what is in the cache.)
The folder, I want to leave alone....


Thanks in advance.
wbnTravis Oklahoma
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Is there a way to kill all files in a folder?

Use this but be careful to get the path correct or you could have a very bad
day.

Sub Button1_Click()
Kill "c:\yourdirectory\*.*"
End Sub


Mike


"wbntravis" wrote:

i do not want to kill the subdirectory or folder. ( It is an IE cache file
and I just want to go in and clean up what is in the cache.)
The folder, I want to leave alone....


Thanks in advance.
wbnTravis Oklahoma

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Is there a way to kill all files in a folder?

Just to add a little info to Mikes caution: files deleted with Kill are not
placed in the recycle bin. They are just deleted.

--
Regards,
Tom Ogilvy


"Mike" wrote:

Use this but be careful to get the path correct or you could have a very bad
day.

Sub Button1_Click()
Kill "c:\yourdirectory\*.*"
End Sub


Mike


"wbntravis" wrote:

i do not want to kill the subdirectory or folder. ( It is an IE cache file
and I just want to go in and clean up what is in the cache.)
The folder, I want to leave alone....


Thanks in advance.
wbnTravis Oklahoma

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Is there a way to kill all files in a folder?

Although Mike has shown you how to delete files in a folder I'd be a bit
careful about messing with IE's cache files. There are dependencies between
the sub folders and hidden dat files. Unless you fully understand how IE
manages those files (I don't) it's generally recommended only to delete
their contents from a batch file at startup.

A bit more in this old thread. For some reason the OP's posts don't appear
visible in Google, (at least not for me) though they can be seen with 'Show
quoted text'

http://tinyurl.com/2vqrjv

Regards,
Peter T

"wbntravis" wrote in message
...
i do not want to kill the subdirectory or folder. ( It is an IE cache file
and I just want to go in and clean up what is in the cache.)
The folder, I want to leave alone....


Thanks in advance.
wbnTravis Oklahoma



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Is there a way to kill all files in a folder?

Chip have info about that on his site
You can find the link in the delete section on this page
http://www.rondebruin.nl/folder.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Tom Ogilvy" wrote in message ...
Just to add a little info to Mikes caution: files deleted with Kill are not
placed in the recycle bin. They are just deleted.

--
Regards,
Tom Ogilvy


"Mike" wrote:

Use this but be careful to get the path correct or you could have a very bad
day.

Sub Button1_Click()
Kill "c:\yourdirectory\*.*"
End Sub


Mike


"wbntravis" wrote:

i do not want to kill the subdirectory or folder. ( It is an IE cache file
and I just want to go in and clean up what is in the cache.)
The folder, I want to leave alone....


Thanks in advance.
wbnTravis Oklahoma



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Is there a way to kill all files in a folder?

Thanks all of you!
I did the folder and dos wildcard thing and it did not work for me
BEFORE I asked the question. Because it did not work... I asked
the question.

You all gave me great food for thought though-
which I will continue to study thanks.




--
wbnTravis, from Oklahoma


"Tom Ogilvy" wrote:

Just to add a little info to Mikes caution: files deleted with Kill are not
placed in the recycle bin. They are just deleted.

--
Regards,
Tom Ogilvy


"Mike" wrote:

Use this but be careful to get the path correct or you could have a very bad
day.

Sub Button1_Click()
Kill "c:\yourdirectory\*.*"
End Sub


Mike


"wbntravis" wrote:

i do not want to kill the subdirectory or folder. ( It is an IE cache file
and I just want to go in and clean up what is in the cache.)
The folder, I want to leave alone....


Thanks in advance.
wbnTravis Oklahoma

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling pdf files from general folder to specific folder [email protected] Excel Discussion (Misc queries) 2 September 8th 09 09:41 PM
How to kill the zipped files in C:\Document and Settings\LogginName\Temp\ using code for this strange Problem Yuvraj Excel Discussion (Misc queries) 2 May 2nd 09 06:52 PM
Kill Files in Excel 2000 AJM1949 Excel Programming 1 September 9th 06 03:47 AM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven Excel Discussion (Misc queries) 1 January 24th 06 03:28 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven[_2_] Excel Programming 1 January 24th 06 04:23 AM


All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"