I am trying to code a funtion that will delete cookies, but when i use SHELL OPERATION or Qweerdy EMUM file for DELETING it will wipe the whole folder clean out as it should. Posted on 2002-05-22 19:45:00 by cmax
read the files-not-to-be-deleted from the ini file into, say, a linked list.
In your file enumeration loop (or however you do it), check if the
current filename is present in the list of filenames to preserve...
if it is, don't delete :).

I could whip up some pseudo or C code if you want.
Posted on 2002-05-22 20:00:22 by f0dder
f0dder, I thought about having the Must files coded in the program and the user files read from the .ini into some buffers when the users is ready to run the function. Than after the job is completed the buffers are zero out.... I can handle the .INI files and the rest so, if you find some TIME latter and only off the top of your head if you come up with something could you give me a asm code or PROC of how to handle the MUST files that will under in the .data section anyway. I use buffers as the list. I think i just need to know how to set flags and work around them, i'm not sure.

Block1 db "c:\Windows\Cookies\index.dat ",0

BlockUser1 db 128 dup(?)
BlockUser2 db 128 dup(?)
BlockUser3 db 128 dup(?)

.if Block1 > 2 ;;;;;;; meaning that it do have a pathName to be skiped ...i don't know what to do from here...

Just an good idea will do f0dder, you done me many favors as it is. I am putting all the piece back together again and all i want to do now is know where everything is in memory than i will be happy. I got most of it ( near all ) down pack now, it is almost a perfect flow as far a FOWARD referencing and where nearly everything set at in MEM.... This stuff is serious but it's just so much fun..... I want this program to dance like a ballerina... I done went NUTS.

Posted on 2002-05-22 21:40:22 by cmax
Okay, here's some pseudocode for you :).

while(not eof inifile)

... later, when you go on deleting files ...

while(more files)
if(not is in list(filename))

So... the things you will need:

*) linked list code (or other way of storing an unknown
amount of data, but linked list is easy and gets the
job done fine).

*) "proper" code to parse the filenames from the ini file
and add them to the linked list.

*) a way to loop through all filenames in a directory
(FindFirstFile, if handle != INVALID_HANDLE_VALUE
enter the processloop, continue looping until FindNextFile
returns zero).

*) processloop. Scan the linked list and see if it has an
entry that matches the WIN32_FIND_DATA.cFileName . Remember
to do this comparison case inSeNSiTiveLy (for example by
using lstrcmpi).

I might write some code a bit later, if you can't get it working
from these steps. I believe it's always most fun to try to do the
things by yourself, it's a much greater feeling if you succeed :).
Posted on 2002-05-22 21:51:12 by f0dder
while(more files)
if(not is in list(filename))

This is what i was looking for... I saw that around for other stuff. I will have it working by tomorrow night. It may be werid the way i do it but it will be workinnnng. I can't waite any longer to come through for you and the crew.

One last question, if i do it with one file ( the not to be deleted file ) what would this line look like. If i see it i can figure all the rest out myself now that i know i can use a while loop.

if(not is in list(filename)) ;;;;; if Block1

Thanks f0dder
Posted on 2002-05-22 22:20:51 by cmax