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.
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)?
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.
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.