| View previous topic :: View next topic |
| Author |
Message |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Sep 09, 2007 7:18 am Post subject: |
|
|
You'll want to make the FindFirst function an if loop
| Code: |
if FindFirst(APath+'\'+edit4.text, faAnyFile, MySearch) = 0 then
begin
repeat
memo1.lines.add(MySearch.Name)
until FindNext(MySearch) <> 0
FindClose(MySearch);
end;
|
now to get subfolders you want to search the MySearch.Name once you receive it and then search that and everything after, until no files are left, then move on to the next folder.
but the problem is it searchs files too which will break the function early.
i dont really feel like writing it but google it, theres a few examples...
also the DeleteFile function makes it look malicious, unless it does something i don't know about.
_________________
|
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Sun Sep 09, 2007 12:28 pm Post subject: |
|
|
| blankrider wrote: | You'll want to make the FindFirst function an if loop
| Code: |
if FindFirst(APath+'\'+edit4.text, faAnyFile, MySearch) = 0 then
begin
repeat
memo1.lines.add(MySearch.Name)
until FindNext(MySearch) <> 0
FindClose(MySearch);
end;
|
now to get subfolders you want to search the MySearch.Name once you receive it and then search that and everything after, until no files are left, then move on to the next folder.
but the problem is it searchs files too which will break the function early.
i dont really feel like writing it but google it, theres a few examples...
also the DeleteFile function makes it look malicious, unless it does something i don't know about. |
well idk what "malicious" mean but i try make a clean up my pc program =p
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Sep 09, 2007 12:33 pm Post subject: |
|
|
malicious = virus
and you could just right click > delete
_________________
|
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
|
| Back to top |
|
 |
|