Page 1 of 1

copy in W10

Posted: Sun Feb 23, 2020 7:36 pm
by Templar
I have converted my application from clipper and it works okay in Windows XP but I'm now having to move to Windows 10. It seems that this will not allow the "copy" command, either copying a whole file, or copying records into a new file. I presume that it doesn't allow new files to be created, which is in line with the "Big Brother Knows Best and You Know Nothing" that microsoft has been steadily adopting.

Is there a way round this?

Templar

Re: copy in W10

Posted: Sun Feb 23, 2020 9:31 pm
by AUGE_OHR
hi,

not sure what you mean with "Copy" under Windows 10

this Tool can do what Windows Explorer can do ( Copy, Move Delete, Rename )
http://hmgforum.com/viewtopic.php?f=5&t=6285&start=40

---

how do you "transfer" your old Apps & Data to new PC :?: using a Backup App :?:
have you Check "Attribut" of your Files ... they might be "RO" ...

Re: copy in W10

Posted: Mon Feb 24, 2020 4:17 pm
by martingz
I don't know who this code is from, but it helped me make my file copy programs

Function FILECOPY(cSource, cDestination, nBuffer, bBlock)
Local sourceHandle, destHandle, lSuccess:= .F., TmpBuff, LastPos
Local BuffPos, ByteCount, cBType:= ValType(bBlock)

Default nBuffer := 8192

If ( (sourceHandle:= fopen(cSource, 0)) != -1 )
If ( (destHandle:= fcreate(cDestination, 0)) != -1 )
LastPos:= fseek(sourceHandle, 0, 2)
BuffPos:= 0
ByteCount:= 0
fseek(sourceHandle, 0, 0)
Do While (BuffPos < LastPos)
TmpBuff := Space(nBuffer)
BuffPos += (ByteCount:= fread(sourceHandle, @TmpBuff, nBuffer))
fwrite(destHandle, TmpBuff, ByteCount)
If cBType == "B"
eval(bBlock, BuffPos / LastPos)
EndIf
EndDo
lSuccess:= fclose(destHandle)
EndIf
fclose(sourceHandle)
EndIf
inkey(1)
Return lSuccess

Re: copy in W10

Posted: Wed Mar 25, 2020 4:59 pm
by Templar
Thanks top you both. I found the problem: it won't allow you to copy files onto the root directory (or "folder", if you're a lot younger than me!)
Which is a PITA as that is where you can store all the initialisation details to tell the system where to look for stuff.
Anyway, I found a workaround which is okay but not as good as the original system.
Thanks again. Now next problem....
Templar