Computing.Net > Forums > Programming > VBscript need to delete .tif

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VBscript need to delete .tif

Reply to Message Icon

Name: Allen (by dryroasted_99)
Date: September 4, 2008 at 21:29:34 Pacific
OS: xp
CPU/Ram: 512
Product: Dell
Comment:

I need help with vbscript. I have a folder which holds .Tif or .jpeg. After user is done with those pic's he/she is suppose to delete pic's in that folder. The script is suppose to prompt the user if they want to remove/delete .tif etc it give them the option of Yes/No. But My script always says "No File Deleted"
I've been working on script but it doesn't seems to work. can you please!

Option Explicit

Dim x
x = True

x = MsgBox ("Are you sure you want to clear all Printed results in the RESULTS folder?", 4,"Delete files?")
If x = True Then
Const DeleteReadOnly = True

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile("C:\test\*.tif"), DeleteReadOnly
MsgBox ("The RESULTS folder has been cleared")
Else
MsgBox ("No Files Deleted")
End If



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: September 4, 2008 at 22:19:01 Pacific
Reply:

If x = 6 Then


0

Response Number 2
Name: Mechanix2Go
Date: September 5, 2008 at 00:55:29 Pacific
Reply:

I dunno VBS, but it seems much to do about little.

=============================
choice are you sure ?
goto %errorlevel%
:1
del *.tif
:2


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 3
Name: toast (by NoIdea)
Date: September 5, 2008 at 02:12:45 Pacific
Reply:

M2
You need to tell them about choice.com.
I like your style.
Much ado about nothing in Blighty.
All the best.


0

Response Number 4
Name: Mechanix2Go
Date: September 5, 2008 at 03:05:29 Pacific
Reply:

CHOICE.COM was apparently included in DOS & XP but left out of W2K.

LOL


=====================================
If at first you don't succeed, you're about average.

M2


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Batch File runs multiple ... Crystal Report



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VBscript need to delete .tif

How to delete record in an array?? www.computing.net/answers/programming/how-to-delete-record-in-an-array/103.html

I need to delete text from a file.. www.computing.net/answers/programming/i-need-to-delete-text-from-a-file/10738.html

batch to delete folders www.computing.net/answers/programming/batch-to-delete-folders-/16161.html