PDA

View Full Version : Faster DeleteFile();...



Jason2gs
08-17-2007, 06:24 AM
My sister was asking me if I felt LimeWire was safe, I told her that if she had decent antivirus, half a brain in her head, and she stuck to mp3s, she's be fine. She asked my dad and mentioned that "Michael has LimeWire on his laptop and he hasn't any problems with it". Well, he called me out there and asked me about it. I said basically the same thing I told my sister. He said he would trust me and went ahead and let my sister use LimeWire.

That was last night, and almost every time I look over when she's on the computer since, she has LimeWire up and she's downloading something.

I tell her that if she goes and screws something up, it's me who's gonna get the heat. (My dad trusted me when I said it was safe. What's he gonna think of my judgment if LimeWire messes something up?)

I don't know if she was joking or not, but she got short with me and said that it was my own dumb fault for saying it was safe. Then I asked her again later on to please be careful with it, and she said something about how I don't need to keep repeating it...

So, as a precaution for if things get out of hand, I'm working on Nolwfy. No LimeWire for you :)

Just an application that sits behind the scenes and deletes LimeWire/LimeWire's Installer/Any LimeWire program files.

It's coming along alright, but the DeleteFile function in Delphi, is a bit slow, and I'm not sure if checking for the existence of the file in the first place would speed things up or not.

One last thing: There isn't a Delphi component made specifically for dealing with files, is there?

Thank you for your time!

-Mike

Bourdou!
08-17-2007, 07:38 AM
Stinks if she screws up her computer before your done...

Miitchyy
08-17-2007, 11:40 AM
If your going to completely shut off limewire why not just make something that ends the process?

Jason2gs
08-17-2007, 02:22 PM
Stinks if she screws up her computer before your done...

My laptop. Her desktop.


If your going to completely shut off limewire why not just make something that ends the process?

Ooh, I didn't think of that :)

Edit: Ooh... How do I grab the Process ID?

Edit2: Never mind. Found some code :)

Harry
08-17-2007, 02:50 PM
You can get viruses from mpg's right?

Jason2gs
08-17-2007, 03:10 PM
Mpgs as in.. Mp3s? (MPEG Layer-3)

http://radio.javaranch.com/frank/2005/01/01/1104606950000.html

Smartzkid
08-17-2007, 03:45 PM
I think mpg's are safe...
wmv's (alnong with asx and wma) are not.

Jason, you might try going straight to the API to delete the files.
(In SCAR: function DeleteFile(thefile: string):LongInt; external 'DeleteFileA@kernel32.dll stdcall'; )

Jason2gs
08-17-2007, 04:17 PM
Hmm.. I might just do that. API Calls are supposed to be faster?

Edit: I may still go with deleting the file[s], but Wolf's idea of terminating the process works GREAT! :)

Spky
08-17-2007, 04:42 PM
Delphi's DeleteFile calls from WinApi anyway.

Jason2gs
08-17-2007, 05:04 PM
O rly? (Sorry. Just came from the Orly Owl thread :rolleyes:)

So there's no faster DeleteFile than the one already in Delphi? That still leaves the question: Does checking for the existence of a file save time?

Harry
08-17-2007, 06:32 PM
Requested to be removed by Jason2gs.

Markus
08-17-2007, 08:55 PM
Telnet to your router and block all outgoing connections on the ports limewire uses from the ip of the desktop.

Bobarkinator
08-18-2007, 02:05 AM
Make your own :rolleyes: