catalpa wrote:Hi :-)
i think, with your new path requester it is not necessary
to edit the code: "[...] +'\'; // Change this value with [...]"
but i still got a error :-/
"Erreur : \\SERVERPATRICK\Filme2\Movie (2013)\Movie (2013).mkv >> I:\Movie (2013).mkv"
ANT can read/write in "\\SERVERPATRICK\Filme2", so i think
its not a permission problem, the drive I: is writable too.
Update, found the bug :-)
1.) i use "Source" for the Movie.mkv, also: GetField(fieldSource); //FilePath);
2.) i NOT wants to move! sorry, my mistake.
i want to copy like the first script! while tasting i kill the
two test movies *facepalm* and can't copy them... (logical)
This is the one I have to copy files:
program CopyMovies;
var
destPath: string;
srcFileName: string;
destFileName: string;
log: TStringList;
ResultPath: string;
begin
if ResultPath = '' then
begin
ResultPath := '---';
Input('Find Duplicates', 'Store results to:', ResultPath);
end;
if GetIteration = 0 then // Initialisation
begin
destPath := ResultPath +'\'; // Change this value with the path where you want to copy movies
log := TStringList.Create;
end;
srcFileName := GetField(fieldURL); //FilePath);
destFileName := destPath + ExtractFileName(srcFileName);
if CopyFile(srcFileName, destFileName, True) then
log.Add('OK : ' + srcFileName + ' >> ' + destFileName)
else
log.Add('Erreur : ' + srcFileName + ' >> ' + destFileName);
if GetField(fieldDisks) = '2' then
begin
srcFileName := StringReplace2(srcFileName, 'Cd1', 'Cd2', True, False);
destFileName := destPath + ExtractFileName(srcFileName);
if CopyFile(srcFileName, destFileName, True) then
log.Add('OK : ' + srcFileName + ' >> ' + destFileName)
else
log.Add('Erreur : ' + srcFileName + ' >> ' + destFileName);
end;
if GetIteration = GetIterationCount-1 then // Finalisation
begin
ShowMemo(Log.Text);
log.Free;
end;
end.