×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to find and erase files?

How to find and erase files?

How to find and erase files?

(OP)
i want to find mirc.ini , server.ini and winstat.dat and erase them.. with a program in pascal.. how can i do that?

RE: How to find and erase files?

You can find files in a given directory with the procedures findfirst and findnext. For deleting a file, you first have to assign it to a file variable (with the procedure assign) and then delete it with the erase procedure.

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: How to find and erase files?

(OP)
can you tell me more about that?

i need this for a vaxine to some irc virus.

RE: How to find and erase files?

Can you be more specific as to what your difficulty is with making this program?
Do you really have to search your hard drive for those files or do you know where they are located?
Can't you delete them from within your OS (Windows I guess)?

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: How to find and erase files?

(OP)
i dont know anything about pascal, only how to run it,. and compile things.

yes.. i have to search for those files because the path of them is variable..  

this is for making a vaxine for irc troyans.

RE: How to find and erase files?

(OP)
i need to do something like this
del /f /s /q c:\mirc32.ini c:\server.ini c:\fserver.ini c:\scripts.ini c:\links.vbs

but in a exe..

RE: How to find and erase files?

If you're not familiar with the Pascal language, I can't help you out. I'm not intending to write a full tutorial here, but you can search the web for one.

If all the functionality you need is in that one line, you could consider using a batch program:
DOS/win example:
@ECHO OFF
del /f /s /q c:\mirc32.ini c:\server.ini c:\fserver.ini c:\scripts.ini c:\links.vbs

If you save this in a text file with a .BAT extension (e.g. remove.bat), you can *run* it as a normal executable.

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: How to find and erase files?

Why do you want to delete the files? You wont be able to run IRC without them. I dont think you're trying to "clean" a virus, I think you're making a very crude one. Sorry if my accusation is false but thats the way I see it.

Based on that, these forums aren't for hackers, crackers or virus / worm writers.

K THX BYE

~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."

RE: How to find and erase files?

(OP)
those files are the infected ... and if someone erase them.. mirc will create new ones.

http://www.mirc.com

RE: How to find and erase files?

ok, so here's a question... you know nothing about pascal, and you need to erase those files because they are infected. What's wrong with erasing them from the dos prompt, or from windows explorer? Why do you need to write a pascal program to clean up your "virus"/trojan? You can just as well use the "find files or folders" from windows start menu, and erase them from the resulting window. It would probably be faster that way.

I'm sorry to say, but I don't think anyone will give you a Pascal course on here, and/or write it for you when there are other options already available...

Just my 2 cents..

Cheers,

Realm174

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close