Hi everyone
I need to copy file and overwrite the one on target location
But nothing happens…
I’v check, the file is well hook ( It work if the original is delete before)
But manually delete it before, is not a good practice ( seen in this tread )
https://forum.xojo.com/24843-copyto-and-moveto-overwrite-issue )
…
I can’t use shell because i’m operating from OSX and ( BOTH files are on windows server )
So what is the workAround ?
With XOJO 2013 4.1
Thanks
[code] if ListboxDrop.ListCount >=1 then
Dim pathToOriginFile As FolderItem
Dim pathToTempFolder As FolderItem
Dim pathToTempFileString As String
Dim pathToTempFile As FolderItem
//get path of tempFolder from the first row ( reserve for that purpose )
pathToTempFolder = GetFolderItem(ListboxDrop.Cell(0,4),FolderItem.PathTypeURL)
for i as integer = 1 to ListboxDrop.ListCount-1
//get path of origin file from listbox.Cell
pathToOriginFile = GetFolderItem(ListboxDrop.Cell(i,4),FolderItem.PathTypeURL)
//Construct path of file in tempFolder
pathToTempFileString = pathToTempFolder.URLPath+ListboxDrop.Cell(i,0)
pathToTempFile = GetFolderItem(pathToTempFileString,FolderItem.PathTypeURL)
pathToTempFile.MoveFileTo(pathToOriginFile.Parent)
next
end[/code]