Results 1 to 20 of 20

Thread: Delphi:

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Android C3P0 finalista's Avatar
    Join Date: Jul:2009
    Location:
    Posts: 948

    Delphi:

    Windows 7 .
    , .
    Delphi, .
    , Hidden, SysFiles Read-only , ;
    :
    W:\Documents and Settings
    W:\Program Files
    W:\Program Files (x86)
    W:\ProgramData
    W:\Windows
    , , .
    !

  2. #2
    Banned haste's Avatar
    Join Date: Mar:2006
    Location:
    Posts: 759
    Windows Unlocker.

    .: finalista, ( " " e), , , , .

  3. #3
    Android C3P0 finalista's Avatar
    Join Date: Jul:2009
    Location:
    Posts: 948
    Delphi.

  4. #4
    Banned haste's Avatar
    Join Date: Mar:2006
    Location:
    Posts: 759


    Code:
    ShowMessage('TestDir remove failed with error : '+
                       IntToStr(GetLastError));
    .

    , .

  5. #5
    Android C3P0 finalista's Avatar
    Join Date: Jul:2009
    Location:
    Posts: 948
    :
    Code:
    ShowMessage('TestDir remove failed with error : '+ IntToStr(GetLastError));
    .
    ( ).
    .
    -, 'W:\ProgramData', - . .

  6. #6
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    ? ?
    GetLastError();
    ? , SHFileOperation
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  7. #7
    Android C3P0 finalista's Avatar
    Join Date: Jul:2009
    Location:
    Posts: 948
    .
    ( , Windows )
    :
    Code:
    procedure TForm1.Remove_Files_SubDirs(Path: string);
    var
      Found:         Integer;
      Attr:          Integer;
      SearchRec:     TSearchRec;
      FileName:      string;
      procedure Prepare_For_Remove(Name: string);
      begin
        if ((FileGetAttr(Name) and faReadOnly) > 0) then
          FileSetAttr(Name, FileGetAttr(Name) xor faReadOnly);
        if ((FileGetAttr(Name) and faHidden) > 0) then
          FileSetAttr(Name, FileGetAttr(Name) xor faHidden);
        if ((FileGetAttr(Name) and faSysFile) > 0) then
          FileSetAttr(Name, FileGetAttr(Name) xor faSysFile);
      end;
    begin
      Attr := faAnyFile;
      Found := FindFirst(Path + '\*.*', Attr, SearchRec);
      while (Found=0) do
      try
        if ((IntToHex(SearchRec.Attr, 8)='00000810')
        or  (IntToHex(SearchRec.Attr, 8)='00000010'))
        and (not (SearchRec.Name[1]='.')) then
        begin
          FileName := Path + '\' + SearchRec.Name;
          Prepare_For_Remove(FileName);
          RemoveDir(FileName);
          Remove_Files_SubDirs(FileName);
        end;
    //.............................
        if (SearchRec.Attr=faDirectory) then
          if (FileName<>'') then
            Memo_SubDirs.Lines.Add(FileName);
        if (not ((SearchRec.Attr=faDirectory) or (SearchRec.Attr=17))
        and not (SearchRec.Name='.') and not (SearchRec.Name='..')) then
        begin
          FileName := Path + '\' + SearchRec.Name;
          Prepare_For_Remove(FileName);
          DeleteFile(FileName);
          Remove_Files_SubDirs(Path);
        end;
    //.............................
        Found := FindNext(SearchRec); // find next file in directory if it exists
      except
        B := False;
      end;
      {
      if B then
      begin
        RemoveDir(FileName);
        RemoveDir(Path);
      end;
      }
      FindClose(SearchRec);
    end;

  8. #8
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    , Windows
    . , ?
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  9. #9
    Android C3P0 finalista's Avatar
    Join Date: Jul:2009
    Location:
    Posts: 948
    Quote Originally Posted by Bombera View Post
    . , ?
    Windows 7 .
    - , .

  10. #10
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    ? . , /, . , .
    , , , - , . .
    GetLastError DeleteFile. - 5.
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  11. #11
    Android C3P0 finalista's Avatar
    Join Date: Jul:2009
    Location:
    Posts: 948
    :
    DeleteFile failed with error : 5

  12. #12
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    ERROR_ACCESS_DENIED. , . , , . . ? W ?
    , , , SHGetSpecialFolderLocations.
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  13. #13
    Android C3P0 finalista's Avatar
    Join Date: Jul:2009
    Location:
    Posts: 948
    ,
    C:\Windows
    C:\Program Files
    ......
    C:\ProgramData

    , Unlocker ( - W:\ProgramData )


    W: . : . ( USB external ).

  14. #14
    Registered User SAGE's Avatar
    Join Date: Sep:2005
    Location: Sofia
    Posts: 171
    Quote Originally Posted by finalista View Post
    ,
    C:\Windows
    C:\Program Files
    ......
    C:\ProgramData

    , Unlocker ( - W:\ProgramData )


    W: . : . ( USB external ).
    "Full control" "File and Folder Permissions".
    "Properties( )\security\Group or user names: Edit\", "Full control" , .

  15. #15
    Android C3P0 finalista's Avatar
    Join Date: Jul:2009
    Location:
    Posts: 948
    , .
    , .
    , Full Control.

  16. #16
    Registered User badboybadboy's Avatar
    Join Date: Mar:2008
    Location: sofia
    Posts: 10,496
    , .

  17. #17
    Android C3P0 finalista's Avatar
    Join Date: Jul:2009
    Location:
    Posts: 948
    live CD Ubuntu 10.04
    .
    Ubuntu .
    ( Delphi . )

  18. #18
    Registered User badboybadboy's Avatar
    Join Date: Mar:2008
    Location: sofia
    Posts: 10,496
    .

  19. #19
    Registered abUser ike's Avatar
    Join Date: Jul:2004
    Location: sofi
    Posts: 4,965
    Quote Originally Posted by finalista View Post
    ( Delphi . )
    , Delphi , windows .
    Have no fear ike iz here.
    CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color

  20. #20
    Exhumator's Avatar
    Join Date: Jan:2005
    Location: Sofia
    Posts: 14,687
    , . . , .
    | Aorus X570 Master | Ryzen 9 5900X | Hellhound 7900XT | G.SKILL 32GB DDR4 3800 CL16 | Enermax Galaxy 1000W | SSD Corsair MP510 960GB & WD-RE3 2 x 1TB RAID0 | Pioneer BDR-209EBK | Creative X-Fi Titanium Fatal1ty & GigaWorks S750 | ViewSonic VX3276-2K-MHD |

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |