Multi Commander Support Forum
Multi Commander => Support and Feedback => Topic started by: Jungle on December 08, 2022, 16:30:22
-
I want to copy some file to the same dir with a new name (manually specified, no autorename). But CopyFile function accepts only path as a target param.
Is it somehow possible to achieve the goal? If no, maybe enhance CopyFile with an additional param or implement a new function CloneFile?
-
You can click & drag/release in the same dir & it shows copy with new name as option on the dialog. (Which you know :) )
Mathias probably needs to add this existing drag functionality to the MS command set, should be possible I hope.
-
I want to copy some file to the same dir with a new name (manually specified, no autorename). But CopyFile function accepts only path as a target param.
Is it somehow possible to achieve the goal? If no, maybe enhance CopyFile with an additional param or implement a new function CloneFile?
That should be able to do that is Script..
So you mean if you set target name like CopyFile ("C:\NewFile.txt" , C:\MyFile.txt" , "NODIALOG, OVERWRITE_ALL" );
It does not work ?
-
So you mean if you set target name like CopyFile ("C:\NewFile.txt" , C:\MyFile.txt" , "NODIALOG, OVERWRITE_ALL" );
It does not work ?
# Error "Source and Target file are the same. Cannot copy a file to itself"
# (err.png)
@var $res = CopyFile("d:\\temp\\abc.txt", "d:\\temp\\1.txt", "NODIALOG")
# $res = 1, but file is not copied
$res = CopyFile("d:\temp\abc.txt", "d:\temp\1.txt", "NODIALOG")
# Shows copy dialog with wrong destination path (err2.png),
# but produce no error, file is not copied
$res = CopyFile("d:\temp\abc.txt", "d:\temp\1.txt")
-
@var $res = CopyFile("d:\\temp\\abc.txt", "d:\\temp\\1.txt", "NODIALOG")
should work.. something must have broken.. I will investigate and see If I can fix that
-
I can confirm the same failures in MC 11.6(build 2845).