Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] Delete directory command?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kopelito
Master Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 483

PostPosted: Tue Mar 25, 2008 11:27 am    Post subject: [Delphi] Delete directory command? Reply with quote

I found this command: RemoveDir('c:\folder').

But somehow it doesnt work, the folder wont be deleted! :S

Are there any other commands? or am I doing something wrong?
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Tue Mar 25, 2008 11:47 am    Post subject: Reply with quote

Are you trying to remove system files? Confused
Back to top
View user's profile Send private message
kopelito
Master Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 483

PostPosted: Tue Mar 25, 2008 11:50 am    Post subject: Reply with quote

Just GameGuard =] (Maplestory..)
Back to top
View user's profile Send private message
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Tue Mar 25, 2008 11:52 am    Post subject: Reply with quote

The contents of the directory are normally required to be empty.
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Tue Mar 25, 2008 12:19 pm    Post subject: Reply with quote

Renkokuken wrote:
The contents of the directory are normally required to be empty.


yeah, that sucks.

Delete a directory with files (or not) in it:
Code:
Function DelTree(DirName : string): Boolean;
var
  SHFileOpStruct : TSHFileOpStruct;
  DirBuf : array [0..255] of char;
begin
  try
   Fillchar(SHFileOpStruct,Sizeof(SHFileOpStruct),0) ;
   FillChar(DirBuf, Sizeof(DirBuf), 0 ) ;
   StrPCopy(DirBuf, DirName) ;
   with SHFileOpStruct do begin
    Wnd := 0;
    pFrom := @DirBuf;
    wFunc := FO_DELETE;
    fFlags := FOF_ALLOWUNDO;
    fFlags := fFlags or FOF_NOCONFIRMATION;
    fFlags := fFlags or FOF_SILENT;
   end;
    Result := (SHFileOperation(SHFileOpStruct) = 0) ;
   except
    Result := False;
  end;
end;   


include shellapi; ( i mean use lol )
Back to top
View user's profile Send private message
kopelito
Master Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 483

PostPosted: Tue Mar 25, 2008 12:27 pm    Post subject: Reply with quote

Can you explain me alittle about this code?
Like how do I direct it to delete a certain folder?

For eg:
I want to delete C:\Nexon\Maplestory

Can you set this code to delete it? then ill see what u changed and know what to do =]

Thank you =]
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Tue Mar 25, 2008 12:30 pm    Post subject: Reply with quote

kopelito wrote:
Can you explain me alittle about this code?
Like how do I direct it to delete a certain folder?

For eg:
I want to delete C:\Nexon\Maplestory

Can you set this code to delete it? then ill see what u changed and know what to do =]

Thank you =]


DelTree('C:\Nexon\MapleStory');
Back to top
View user's profile Send private message
kopelito
Master Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 483

PostPosted: Tue Mar 25, 2008 12:34 pm    Post subject: Reply with quote

Awwwww

Understood =]

Thanx
Back to top
View user's profile Send private message
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Tue Mar 25, 2008 12:44 pm    Post subject: Reply with quote

Proper credits should be provided!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites