| |
|
|
Julian Schmidt | Hi, I try straight a directory To copy & supplant. as Base have I this View source: [...] my Ansatz sees so from:
SHFileoperation("Copy","C:\Test","C:\Test2",1,1,0)
Proc SHFileoperation
Parameters operation$,File$,File2$,confirm%,recycle%,can%
Declare opstruct#,file#,file2#,title#,operation&
Var FOF_Flag% = 1 | 512 | 2048'FOF_MULTIDESTFILES,FOF_NOCONFIRMMKDIR,FOF_NOCOPYSECURITYATTRIBS
Dim title#,24
string title#,0 = "Fileoperation Progress"
Select upper$(operation$)
CaseOf "RENAME"
operation&=4
CaseOf "COPY"
operation&=2
CaseOf "MOVE"
operation&=1
CaseOf "DELETE"
operation&=3
endselect
case confirm%:confirm%=16
Casenot recycle%:recycle%=64
If can%
FOF_Flag% = FOF_Flag% | confirm% | recycle% | $20 | 8'$20 = FOF_WANTMAPPINGHANDLE 8 = FOF_RENAMEONCOLLISION
Else
FOF_Flag% = FOF_FLAG% | confirm% | recycle%'16 = FOF_NOCONFIRMATION,64 = FOF_ALLOWUNDO
endif
Dim opstruct#,30:Dim file#,(Len(file$)+2):Dim file2#,(Len(file2$)+2)
String file#,0=(file$+Chr$(0)):String file2#,0=(file2$+Chr$(0))
Long opstruct#,0=GetActiveWindow()' lever the aufrufenden Fensters
Long opstruct#,4=operation&'which Dateioperation made becomes
Long opstruct#,8=file#' pfrom : here The Files for operation
Long opstruct#,12=file2#'pto here The Zieldateinamen or 0
Word opstruct#,16=FOF_Flag%
Long opstruct#,18=0'with discontinue standing here 1 only long Operationen
Long opstruct#,22=0' must always zero his, here becomes lever for SHNameMappings staid with copy
Long opstruct#,26=Title#'Headline the Fortschrittsdialogs with long Operationen
Var FEHLER&=External("SHELL32","SHFileOperationA",opstruct#)
IF (long(opstruct#,18)=1)
MessageBox("Die Dateioperation aborted!","Abbruch through user!",64)
ELSEIF (Fehler& <> 0)
MessageBox(st$(fehler&),"Es is a Error aufgetreten",16)
EndIf
If val($WinVer)> 5.0
Case LONG(opstruct#,22) <> 0:External("Shell32","SHFreeNameMappings",LONG(opstruct#,22))'mins XP
endif
Dispose file#,file2#,opstruct#,title#
Return Fehler&
ENDPROC
under XP functions it perfect, only under windows 7(alike which Version) comes always....
If I the View source as Administrator ausführe comes detailed the same. what can I against it make? |
|
|
| |
|
|
|
| Hi!
Kannste imho nothing make if others programs Files Benutzung having except even these programs To terminate. |
|
|
| |
|
|
|
Julian Schmidt | The Ordner is not Benutzung. Per windows Explorer can I it too without Problems delete or rename. These Message have I before yet never seen! If a File in Benutzung is comes eig. always these Message....
File uses - The action can't completed go, since the File opened is. Closing tappt im dunkeln The File and repeat tappt im dunkeln whom process... repeat,Überspringen,Cancel |
|
|
| |
|
|
|
Andreas Miethe
| Info :
SHFileOperation Function
Copies, moves, renames, or deletes a file system object. Diese function has been replaced in windows Vista by IFileOperation. |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 11/15/11 ▲ |
|
|
|
|
Julian Schmidt | functions IFileOperation. too under WinXP? Anwendungsbeispiel? |
|
|
| |
|
|
|
| look time: [...]
MSDN
minimum supported client: windows Vista |
|
|
| |
|
|
|
Julian Schmidt | hmmmm....Gibts it too one API-function The sowohl under WinXP and WinVista, Win7 functions? otherwise should one even first the OS detect and then The function according to OS dial, what How I find To umständlich would... |
|
|
| |
|
|
|
Jörg Sellmeyer | the would not the first time since windows 1.0... |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 11/15/11 ▲ |
|
|
|
|
Julian Schmidt | hmmm.....pity the it moreover no homogeneous kompatible function gives. there must I must well time there set and what together write ....
time look when I Time find.... at the latest sunday |
|
|
| |
|
|