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

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

VBscript need to delete .tif

Reply to Message Icon

Original Message
Name: Allen (by dryroasted_99)
Date: September 4, 2008 at 21:29:34 Pacific
Subject: VBscript need to delete .tif
OS: xp
CPU/Ram: 512
Model/Manufacturer: 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


Report Offensive Message For Removal


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

If x = 6 Then


Report Offensive Follow Up For Removal

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

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


Report Offensive Follow Up For Removal

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

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


Report Offensive Follow Up For Removal

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

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


Report Offensive Follow Up For Removal







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








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge
Poll History




Data Recovery Software