Recently Browsing 0 members
No registered users viewing this page.
I like and have been using TeraCopy, a third party program, for many years. Mostly it is a great program, but it does have some issues. On Windows XP for instance, Thumbs.db files could often hold up a copy or move process until the user manually responded to the error prompt. Some other issues I discuss below.
PLEASE NOTE - I am not related to or affiliated in any way with the 3rd party TeraCopy program developers.
ALSO NOTE - I myself have only tested TeraCopy Cure at this point, on Windows 7 (32 bit), and only with the free version of TeraCopy 2.27.
This program, TeraCopy Cure, is related to another one of my TeraCopy assistant programs, TeraCopy Timer, but aims at being simpler and quicker to use ... if lacking its more advanced features.
TeraCopy Cure is a frontend for TeraCopy and sets out to make up for its flaws and limitations.
One of those flaws is queuing order, and the limitation relates to a same destination issue.
You would think that queue order would be the same as add order, but that is not the case, and if you are doing a mix of COPY and MOVE then the COPY process could easily fail. It could fail with some source items, even if the COPY process has already started before the same source MOVE process begins ... especially if the destination folder is on the source drive ... only the currently copying file is locked to that process.
If you drag and drop another source for a same destination as an existing or impending COPY or MOVE process, then usually TeraCopy nicely adds it for you to that existing job. However, you might wish to avoid that, or it might occur during the testing phase of that active process, and then not be properly processed etc. But you are not given a choice and it just gets added.
HOW TO USE
See the right-click menu of the 'Batch List' (lowest field) and the right-click menu of the Tree field, for some useful options.
(1) If desired, enable 'Auto Start'. NOTE - Even if enabled, this can be bypassed.
(2) Set the destination folder, either by browsing on the tree or by dragging a folder to the Destination input field or label. Right-clicking on a folder in Explorer will also work, if enabled. The destination folder path will also show in the Tree if that right-click option is enabled.
(3) Then drag & drop source file or folder onto one of three five areas - Folder (Drive) Tree field, or COPY or MOVE buttons ... this now also includes the source input and label.
NOTE - If the Folder (Drive) Tree field is used, then you will additionally need to click either the COPY or MOVE button, to have that job added to the Batch List ... but this avoids 'Auto Start' if it is enabled. Drag & dropping to the buttons instead, saves on clicking, but starts the first job etc immediately if 'Auto Start' is enabled.
(4) If needed and ready, click the START button to run the first job and those that follow.
More information is included in program and in the NOTES etc sections below.
WARNING - Depending on the amount of content on your destination drive, and folder level depth, and the speed of your PC, display of the full path in the Folder (Drive) Tree can take a while to show ... if you have that (right-click) option enabled ... it isn't by default. I found this feature quite tricky to get right, and I'm still not 100% sure it is now full-proof.
TeraCopy Cure v1.5.zip (source is included)
TeraCopy Cure v1.6.zip (source is included)
#include <WinAPI.au3> $text = FileReadLastChars("C:\Program Files\AutoIt3\Include\Array.au3", 1024) MsgBox(0, 'FileReadLastChars', $text) Func FileReadLastChars($sFile, $nChars) Local $nBytes $tBuffer = DLLStructCreate("char["&$nChars&"]") $hFile = _WinAPI_CreateFile($sFile, 2, 2) ; open for read _WinAPI_SetFilePointer($hFile, -1 * $nChars, 2) ; from end _WinAPI_ReadFile($hFile, DLLStructGetPtr($tBuffer), $nChars, $nBytes) _WinAPI_CloseHandle($hFile) Return DLLStructGetData($tBuffer, 1) EndFunc ; included as standard UDF since AutoIt 220.127.116.11 version Func _WinAPI_SetFilePointer($hFile, $iPos, $iMethod = 0) $aResult = DllCall( "kernel32.dll", "long", "SetFilePointer", "hwnd", $hFile, "long", $iPos, "long_ptr", 0, "long", $iMethod) If @error Then Return SetError(1, 0, -1) If $aResult = -1 Then Return SetError(2, 0, -1) ; $INVALID_SET_FILE_POINTER = -1 Return $aResult EndFunc ;==>_WinAPI_SetFilePointer Here is my topic about _WinAPI_SetFilePointer()
EDIT: simpler version compatible with latest AutoIt
$text = FileReadLastChars("C:\Program Files\AutoIt3\Include\Array.au3", 1024) MsgBox(0, 'FileReadLastChars', $text) Func FileReadLastChars($sFile , $nChars) $hFile = FileOpen($sFile, 0) ; open for read FileSetPos($hFile, -1 * $nChars, 2) ; from end $sRet = FileRead($hFile) FileClose($hFile) Return $sRet EndFunc
goodmorning autoit team
today am comming with some winhttp problems, i hope that you can help me to solve them.
the first problem
is when opening a request
my forums api allow me to delete any post using the api key
all functions work, i mean post / get
but when i tried to use the delete verb it's gave me an html 404 error
here is what am tried
#include "WinHttp.au3" ; Open needed handles Global $hOpen = _WinHttpOpen() Global $hConnect = _WinHttpConnect($hOpen, "xxxxxxxx.com") ; Specify the reguest: Global $hRequest = _WinHttpOpenRequest($hConnect, "Delete", "/vb/Api/posts/10447/?hard_delete=true", default, default) _WinHttpAddRequestHeaders($hRequest, "XF-Api-Key:xxxxx") _WinHttpAddRequestHeaders($hRequest, "XF-Api-User:xxxxx") ; Send request _WinHttpSendRequest($hRequest) ; Wait for the response _WinHttpReceiveResponse($hRequest) Global $sHeader = 0, $sReturned = 0 ; If there is data available... If _WinHttpQueryDataAvailable($hRequest) Then $sHeader = _WinHttpQueryHeaders($hRequest, $WINHTTP_QUERY_CONTENT_DISPOSITION) ;Or maybe: ; $sHeader = _WinHttpQueryHeaders($hRequest, BitOR($WINHTTP_QUERY_RAW_HEADERS_CRLF, $WINHTTP_QUERY_CUSTOM), "Content-Disposition") Do $sReturned &= _WinHttpReadData($hRequest) Until @error msgBox(64, "", $sReturned) endIf ; Close handles _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen)
and here is the error message
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access /vb/Api/posts/10447/ on this server.<br /> </p> </body></html>
i hope you can help me
thanks in advance
Is it possible to unzip a zip file in Autoit without using a dll!
My script downloads a zip file to a temporary directory (successfully) and it must be unzipped to (Or moved to after unzip) another a folder which just happens to be
@scriptdir & "file.exe" Thanks in advance