Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find and erase files?

Status
Not open for further replies.

vernom

Technical User
Oct 4, 2003
7
MX
i want to find mirc.ini , server.ini and winstat.dat and erase them.. with a program in pascal.. how can i do that?
 
You can find files in a given directory with the procedures [tt]findfirst[/tt] and [tt]findnext[/tt]. For deleting a file, you first have to assign it to a file variable (with the procedure [tt]assign[/tt]) and then delete it with the [tt]erase[/tt] procedure.

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
Don't worry what people think about you. They're too busy wondering what you think about them.
 
can you tell me more about that?

i need this for a vaxine to some irc virus.
 
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
Don't worry what people think about you. They're too busy wondering what you think about them.
 
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.
 
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..
 
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:[/code]
@ECHO OFF
del /f /s /q c:\mirc32.ini c:\server.ini c:\fserver.ini c:\scripts.ini c:\links.vbs
[/code]
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
Don't worry what people think about you. They're too busy wondering what you think about them.
 
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..."
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top