PC Review


Reply
Thread Tools Rate Thread

DELETING FILES FROM A FOLDER WITH SPECIFIC EXTENSION

 
 
R v Deursen
Guest
Posts: n/a
 
      28th May 2004
I have a folder that contains generated .pdf files.
In the same folder there is after .pdf creation always a
second file of each pdf with the extension .apd.
I need a VB script that automatically searches for files
with the extension .apd in the same folder as the pdf,s
and deletes them.

There is already a peace of the script, but it is totally
wrong or incomplete.

Thank you so much.

Dim objFSO
Set objFSO = CreateObject
("Scripting.FileSystemObject")
objFSO.DeleteFile "G:\page
store\CERT_TIJDSCHRIFTEN_NL\*.apd"

Set objFSO = Nothing
Wscript.Quit

 
Reply With Quote
 
 
 
 
keepitcool
Guest
Posts: n/a
 
      28th May 2004
Hi,

why don't you use simple DIR and KILL?
see vba help for DIR function..
there's a good example there on how to loop....
the KILL explains itself...



< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >


"R v Deursen" <(E-Mail Removed)> wrote:

> I have a folder that contains generated .pdf files.
> In the same folder there is after .pdf creation always a
> second file of each pdf with the extension .apd.
> I need a VB script that automatically searches for files
> with the extension .apd in the same folder as the pdf,s
> and deletes them.
>
> There is already a peace of the script, but it is totally
> wrong or incomplete.
>
> Thank you so much.
>
> Dim objFSO
> Set objFSO = CreateObject
> ("Scripting.FileSystemObject")
> objFSO.DeleteFile "G:\page
> store\CERT_TIJDSCHRIFTEN_NL\*.apd"
>
> Set objFSO = Nothing
> Wscript.Quit
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tool for deleting all files except specific file extension? laterna@magic.ms Freeware 12 12th Jun 2006 08:33 AM
Search for files with specific extension Merrit Microsoft Dot NET Compact Framework 6 21st Jun 2005 04:39 PM
Hide All Files of Specific Extension =?Utf-8?B?U0o=?= Windows XP General 6 8th Nov 2004 10:56 AM
MSIE requires specific file extension of XML files with XSL styles =?Utf-8?B?UmVuw6kgQsO4amUgTmllbHNlbg==?= Windows XP Internet Explorer 0 18th Jun 2004 12:29 PM
What're the file extension or folder for messages files? Tade Walker Microsoft Outlook Discussion 1 12th Feb 2004 12:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:06 AM.