English
Source / code snippets

Api copy Ordner

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
API: Ordner kopieren
Def @SHFileOperation(1) !SHELL32,SHFileOperationA

Proc Fileaction

    Parameters Action$,File$,File2$,noconfirm%,norecycle%
    Parameter 1: Aktion to perform=COPY, DELETE, RENAME, MOVE
    Parameter 2: Source
    Parameter 3: Destination
    Parameter 4: 0 =ask User, 1=delete without any questions
    Parameter 5: 0=delete into recycle bin, 1=delete without copying into recycle bin
    Declare FOF_Flag%,Action&,DO%,Fehler&
    Declare opstruct#,file#,file2#
    LET DO%=0

    IF @upper$(Action$)=RENAME

        Let Action&=4

    elseIF @upper$(Action$)=COPY

        Let Action&=2

    elseIF @upper$(Action$)=MOVE

        Let Action&=1

    elseIF @upper$(Action$)=DELETE

        Let Action&=3

    else

        @messagebox(This funktion is unknown!,Error!,64)
        LEt DO%=1

    endif

    IF DO%=0

        Case noconfirm% : Let noconfirm%=16
        CaseNot norecycle% : Let norecycle%=64
        Let FOF_Flag% = @or(noconfirm%,norecycle%)
        Dim opstruct#,30
        Dim file#,Add(Len(file$),2)
        Dim file2#,Add(Len(file2$),2)
        String file#,0=@Add$(file$,@Chr$(0))
        String file2#,0=@Add$(file2$,@Chr$(0))
        Long opstruct#,0=%hwnd
        Long opstruct#,4=Action&
        Long opstruct#,8=file#
        Long opstruct#,12=file2#      pto (muß 0 oder eine Bereichvar. mit Zieldateinamen                                                                                             z.B. bei Umbenennung sein
        Word opstruct#,16=FOF_Flag%
        Long opstruct#,18=0
        Long opstruct#,22=0
        Long opstruct#,26=0
        LET FEHLER&=@ShFileOperation(opstruct#)

        IF @equ(@long(opstruct#,18),1)

            @MessageBox(Operation has been abborded by the user!,Operation abborded!,64)

        ELSEIF @neq(Fehler&,0)

            @MessageBox(An Error has occured!,ShFileOperation +@str$(Fehler&),16)

        EndIf

        Dispose file#
        Dispose file2#
        Dispose opstruct#

    endif

EndProc

REM Beispiel
Fileaction COPY,C:WINDOWS,C:CopyWin,0,0
Fileaction DELETE,C:CopyWin,,0,1
 
07/15/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.703 Views

Untitledvor 0 min.
R.Schneider03/21/17
Klaus Ernst08/25/14
AndreasS07/16/12
Dieter Zornow04/25/11
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie