copy in W10

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 4 times
Been thanked: 3 times

copy in W10

Post 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?


User avatar
Posts: 1015
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 166 times
Been thanked: 283 times

Post by AUGE_OHR »


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

this Tool can do what Windows Explorer can do ( Copy, Move Delete, Rename )


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" ...
have fun

Posts: 305
Joined: Wed Nov 18, 2009 11:14 pm
Location: Mexico
Has thanked: 30 times
Been thanked: 19 times

Post 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)
lSuccess:= fclose(destHandle)
Return lSuccess

Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF
Has thanked: 4 times
Been thanked: 3 times

Post 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....

Post Reply