------------------------------------------------------------
[BUG/PRB.] VFP 9.0 FIX - COPY FILE COMMAND
January 2026
------------------------------------------------------------
CCB
1. BUG:
In vfp9 (and vfp6, vfp7, vfp8), the COPY FILE command always creates the destination file with a lower case file name.
In Windows operating system, we can use the file names with case insensitive,
for example, the file name ABC.TXT is the same as the file name abc.txt.
In other operating systems such as Unix and Linux, we use the file names with case sensitive,
for example, the file name ABC.TXT is not the same as the file name abc.txt, they are two different file names.
The bug was reported by Walther Neuhardt.
2. CAUSE:
There are some BUGs in the following code.
3. RESOLUTION:
We can write some code to fix the BUG.
Fun6d6e05 :: ; proc near
push ebp ;0x006d6e05 : 55
lea ebp , dword ptr [ esp + 0FFFFF8ACh ] ;0x006d6e06 : 8dac24acf8ffff
sub esp , 07DCh ;0x006d6e0d : 81ecdc070000
mov eax , dword ptr [ Data937090 ] ;0x006d6e13 : a190709300
push ebx ;0x006d6e18 : 53
push esi ;0x006d6e19 : 56
push edi ;0x006d6e1a : 57
mov dword ptr [ ebp + 0750h ] , eax ;0x006d6e1b : 898550070000
xor eax , eax ;0x006d6e21 : 33c0
xor edx , edx ;0x006d6e23 : 33d2
inc dword ptr [ Data9393ac ] ;0x006d6e25 : ff05ac939300
mov ecx , 090h ;0x006d6e2b : b990000000
lea edi , dword ptr [ ebp + 0404h ] ;0x006d6e30 : 8dbd04040000
rep stosd ;0x006d6e36 : f3ab
lea eax , dword ptr [ ebp + 02FCh ] ;0x006d6e38 : 8d85fc020000
push eax ;0x006d6e3e : 50
mov edi , offset Data93a8c0 ;0x006d6e3f : bfc0a89300
mov ebx , offset Data91aed0 ;0x006d6e44 : bbd0ae9100
mov dword ptr [ ebp - 36 ] , edx ;0x006d6e49 : 8955dc
mov dword ptr [ ebp - 32 ] , edx ;0x006d6e4c : 8955e0
mov byte ptr [ ebp + 02FCh ] , dl ;0x006d6e4f : 8895fc020000
call Fun52a205 ;0x006d6e55 : e8ab33e5ff
inc dword ptr [ Data9393ac ] ;0x006d6e5a : ff05ac939300
lea eax , dword ptr [ ebp + 01F4h ] ;0x006d6e60 : 8d85f4010000
push eax ;0x006d6e66 : 50
xor edi , edi ;0x006d6e67 : 33ff
mov byte ptr [ ebp + 01F4h ] , 00h ;0x006d6e69 : c685f401000000
call Fun52a205 ;0x006d6e70 : e89033e5ff
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
; mov dword ptr vfpa_copyfile_nottolower,01h
xor ebx , ebx ;0x006d6e75 : 33db
push ebx ;0x006d6e77 : 53
mov edi , 0105h ;0x006d6e78 : bf05010000
push edi ;0x006d6e7d : 57
lea edx , dword ptr [ ebp + 0404h ] ;0x006d6e7e : 8d9504040000
lea ecx , dword ptr [ ebp + 02FCh ] ;0x006d6e84 : 8d8dfc020000
call Fun43d389 ;0x006d6e8a : e8fa64d6ff
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
Label6d6e8e ::
; mov dword ptr vfpa_copyfile_nottolower,00h
Label6d6e8f ::
push ebx ;0x006d6e8f : 53
lea eax , dword ptr [ ebp + 0404h ] ;0x006d6e90 : 8d8504040000
push eax ;0x006d6e96 : 50
call Fun4156a2 ;0x006d6e97 : e806e8d3ff
test eax , eax ;0x006d6e9c : 85c0
je Label6d6ecb ;0x006d6e9e : 742b
pushd offset Data928494 ;0x006d6ea0 : 6894849200
push edi ;0x006d6ea5 : 57
lea esi , dword ptr [ ebp + 0404h ] ;0x006d6ea6 : 8db504040000
call Fun5557a3 ;0x006d6eac : e8f2e8e7ff
push ebx ;0x006d6eb1 : 53
push ebx ;0x006d6eb2 : 53
push ebx ;0x006d6eb3 : 53
push edi ;0x006d6eb4 : 57
mov eax , esi ;0x006d6eb5 : 8bc6
push eax ;0x006d6eb7 : 50
call Fun437e2a ;0x006d6eb8 : e86d0fd6ff
push eax ;0x006d6ebd : 50
mov edx , esi ;0x006d6ebe : 8bd6
lea ecx , dword ptr [ ebp + 02FCh ] ;0x006d6ec0 : 8d8dfc020000
call Fun42cc34 ;0x006d6ec6 : e8695dd5ff
Label6d6ecb ::
lea eax , dword ptr [ ebp + 02FCh ] ;0x006d6ecb : 8d85fc020000
push eax ;0x006d6ed1 : 50
lea eax , dword ptr [ ebp - 52 ] ;0x006d6ed2 : 8d45cc
push eax ;0x006d6ed5 : 50
call Fun434bcf ;0x006d6ed6 : e8f4dcd5ff
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
; mov dword ptr vfpa_copyfile_nottolower,01h
push ebx ;0x006d6edb : 53
push edi ;0x006d6edc : 57
lea edx , dword ptr [ ebp + 0644h ] ;0x006d6edd : 8d9544060000
lea ecx , dword ptr [ ebp + 01F4h ] ;0x006d6ee3 : 8d8df4010000
call Fun43d389 ;0x006d6ee9 : e89b64d6ff
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
Label6d6eed ::
; mov dword ptr vfpa_copyfile_nottolower,00h
Label6d6eee ::
push ebx ;0x006d6eee : 53
lea eax , dword ptr [ ebp + 0644h ] ;0x006d6eef : 8d8544060000
push eax ;0x006d6ef5 : 50
call Fun4156a2 ;0x006d6ef6 : e8a7e7d3ff
test eax , eax ;0x006d6efb : 85c0
je Label6d6f2a ;0x006d6efd : 742b
pushd offset Data928494 ;0x006d6eff : 6894849200
push edi ;0x006d6f04 : 57
lea esi , dword ptr [ ebp + 0644h ] ;0x006d6f05 : 8db544060000
call Fun5557a3 ;0x006d6f0b : e893e8e7ff
push ebx ;0x006d6f10 : 53
push ebx ;0x006d6f11 : 53
push ebx ;0x006d6f12 : 53
push edi ;0x006d6f13 : 57
mov eax , esi ;0x006d6f14 : 8bc6
push eax ;0x006d6f16 : 50
call Fun437e2a ;0x006d6f17 : e80e0fd6ff
push eax ;0x006d6f1c : 50
mov edx , esi ;0x006d6f1d : 8bd6
lea ecx , dword ptr [ ebp + 01F4h ] ;0x006d6f1f : 8d8df4010000
call Fun42cc34 ;0x006d6f25 : e80a5dd5ff
Label6d6f2a ::
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
; mov dword ptr vfpa_copyfile_nottolower,01h
xor esi , esi ;0x006d6f2a : 33f6
inc esi ;0x006d6f2c : 46
mov edi , esi ;0x006d6f2d : 8bfe
mov eax , esi ;0x006d6f2f : 8bc6
lea edx , dword ptr [ ebp + 0644h ] ;0x006d6f31 : 8d9544060000
lea ecx , dword ptr [ ebp + 01F4h ] ;0x006d6f37 : 8d8df4010000
call Fun43f2b9 ;0x006d6f3d : e87783d6ff
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
Label6d6f41 ::
; mov dword ptr vfpa_copyfile_nottolower,00h
Label6d6f42 ::
lea eax , dword ptr [ ebp + 01F4h ] ;0x006d6f42 : 8d85f4010000
push eax ;0x006d6f48 : 50
lea eax , dword ptr [ ebp - 48 ] ;0x006d6f49 : 8d45d0
push eax ;0x006d6f4c : 50
call Fun434bcf ;0x006d6f4d : e87ddcd5ff
lea edx , dword ptr [ ebp - 44 ] ;0x006d6f52 : 8d55d4
lea eax , dword ptr [ ebp + 0FFFFFF7Ch ] ;0x006d6f55 : 8d857cffffff
call Fun42c27f ;0x006d6f5b : e81f53d5ff
push ebx ;0x006d6f60 : 53
push eax ;0x006d6f61 : 50
call Fun42c2be ;0x006d6f62 : e85753d5ff
mov edi , eax ;0x006d6f67 : 8bf8
cmp edi , ebx ;0x006d6f69 : 3bfb
pop ecx ;0x006d6f6b : 59
pop ecx ;0x006d6f6c : 59
jne Label6d6ff3 ;0x006d6f6d : 0f8580000000
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
; mov dword ptr vfpa_copyfile_nottolower,01h
push ebx ;0x006d6f73 : 53
lea eax , dword ptr [ ebp + 0404h ] ;0x006d6f74 : 8d8504040000
push eax ;0x006d6f7a : 50
call Fun42c953 ;0x006d6f7b : e8d359d5ff
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
Label6d6f7f ::
; mov dword ptr vfpa_copyfile_nottolower,00h
Label6d6f80 ::
cmp eax , ebx ;0x006d6f80 : 3bc3
jne Label6d6ff3 ;0x006d6f82 : 756f
mov dword ptr [ ebp - 36 ] , esi ;0x006d6f84 : 8975dc
Label6d6f87 ::
lea eax , dword ptr [ ebp + 052Ch ] ;0x006d6f87 : 8d852c050000
push eax ;0x006d6f8d : 50
lea eax , dword ptr [ ebp - 52 ] ;0x006d6f8e : 8d45cc
push eax ;0x006d6f91 : 50
lea eax , dword ptr [ ebp + 0ECh ] ;0x006d6f92 : 8d85ec000000
push eax ;0x006d6f98 : 50
call Fun42c5c5 ;0x006d6f99 : e82756d5ff
lea eax , dword ptr [ ebp + 052Ch ] ;0x006d6f9e : 8d852c050000
push eax ;0x006d6fa4 : 50
lea ecx , dword ptr [ ebp + 0644h ] ;0x006d6fa5 : 8d8d44060000
call Fun75fa7f ;0x006d6fab : e8cf8a0800
lea eax , dword ptr [ ebp + 052Ch ] ;0x006d6fb0 : 8d852c050000
push eax ;0x006d6fb6 : 50
lea eax , dword ptr [ ebp - 48 ] ;0x006d6fb7 : 8d45d0
push eax ;0x006d6fba : 50
lea eax , dword ptr [ ebp - 28 ] ;0x006d6fbb : 8d45e4
push eax ;0x006d6fbe : 50
call Fun42c5c5 ;0x006d6fbf : e80156d5ff
lea eax , dword ptr [ ebp - 28 ] ;0x006d6fc4 : 8d45e4
push eax ;0x006d6fc7 : 50
lea eax , dword ptr [ ebp + 0ECh ] ;0x006d6fc8 : 8d85ec000000
push eax ;0x006d6fce : 50
call Fun6d6beb ;0x006d6fcf : e817fcffff
cmp eax , 0FFFFFFFEh ;0x006d6fd4 : 83f8fe
je Label6d6fe4 ;0x006d6fd7 : 740b
cmp eax , 0FFFFFFFDh ;0x006d6fd9 : 83f8fd
je Label6d6ff3 ;0x006d6fdc : 7415
inc dword ptr [ ebp - 32 ] ;0x006d6fde : ff45e0
mov dword ptr [ ebp - 40 ] , eax ;0x006d6fe1 : 8945d8
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
lea eax , dword ptr [ ebp - 28 ]
push eax
push eax
call MoveFileA
Label6d6fe4 ::
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
; mov dword ptr vfpa_copyfile_nottolower,01h
lea eax , dword ptr [ ebp + 0404h ] ;0x006d6fe4 : 8d8504040000
call Fun49cced ;0x006d6fea : e8fe5cdcff
;
; -------------------------------------------------
; VFP 9.0 FIX - COPY FILE COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the COPY FILE command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
Label6d6fee ::
; mov dword ptr vfpa_copyfile_nottolower,00h
Label6d6fef ::
test eax , eax ;0x006d6fef : 85c0
je Label6d6f87 ;0x006d6ff1 : 7494
Label6d6ff3 ::
lea eax , dword ptr [ ebp - 44 ] ;0x006d6ff3 : 8d45d4
push eax ;0x006d6ff6 : 50
lea eax , dword ptr [ ebp + 0FFFFFF7Ch ] ;0x006d6ff7 : 8d857cffffff
call Fun42d200 ;0x006d6ffd : e8fe61d5ff
lea esi , dword ptr [ ebp + 0404h ] ;0x006d7002 : 8db504040000
call Fun43e393 ;0x006d7008 : e88673d6ff
cmp edi , ebx ;0x006d700d : 3bfb
je Label6d7018 ;0x006d700f : 7407
mov ecx , edi ;0x006d7011 : 8bcf
call Fun544742 ;0x006d7013 : e82ad7e6ff
Label6d7018 ::
cmp dword ptr [ ebp - 36 ] , ebx ;0x006d7018 : 395ddc
jne Label6d7032 ;0x006d701b : 7515
lea ecx , dword ptr [ ebp + 02FCh ] ;0x006d701d : 8d8dfc020000
call Fun44d338 ;0x006d7023 : e81063d7ff
mov ecx , 0ADh ;0x006d7028 : b9ad000000
call Fun544742 ;0x006d702d : e810d7e6ff
Label6d7032 ::
mov eax , dword ptr [ Data9370f8 ] ;0x006d7032 : a1f8709300
mov eax , dword ptr [eax] ;0x006d7037 : 8b00
cmp dword ptr [ eax + 0118h ] , ebx ;0x006d7039 : 399818010000
je Label6d7082 ;0x006d703f : 7441
cmp word ptr [ ebp - 32 ] , bx ;0x006d7041 : 66395de0
jbe Label6d7082 ;0x006d7045 : 763b
cmp word ptr [ ebp - 32 ] , 01h ;0x006d7047 : 66837de001
je Label6d705a ;0x006d704c : 740c
movzx eax ,word ptr [ ebp - 32 ] ;0x006d704e : 0fb745e0
push eax ;0x006d7052 : 50
mov ecx , 051Bh ;0x006d7053 : b91b050000
jmp Label6d7062 ;0x006d7058 : eb08
Label6d705a ::
push dword ptr [ ebp - 40 ] ;0x006d705a : ff75d8
mov ecx , 0508h ;0x006d705d : b908050000
Label6d7062 ::
call Fun42c583 ;0x006d7062 : e81c55d5ff
push eax ;0x006d7067 : 50
lea eax , dword ptr [ ebp + 0644h ] ;0x006d7068 : 8d8544060000
push eax ;0x006d706e : 50
call Fun43089c ;0x006d706f : e82898d5ff
add esp , 0Ch ;0x006d7074 : 83c40c
lea eax , dword ptr [ ebp + 0644h ] ;0x006d7077 : 8d8544060000
call Fun543829 ;0x006d707d : e8a7c7e6ff
Label6d7082 ::
mov ecx , dword ptr [ ebp + 0750h ] ;0x006d7082 : 8b8d50070000
call Fun42bf1d ;0x006d7088 : e8904ed5ff
pop edi ;0x006d708d : 5f
pop esi ;0x006d708e : 5e
pop ebx ;0x006d708f : 5b
add ebp , 0754h ;0x006d7090 : 81c554070000
leave ;0x006d7096 : c9
ret ;0x006d7097 : c3
Fun890a33 :: ; proc near
push ebp ;0x00890a33 : 55
lea ebp , dword ptr [ esp + 0FFFFFAC0h ] ;0x00890a34 : 8dac24c0faffff
sub esp , 05CCh ;0x00890a3b : 81eccc050000
mov eax , dword ptr [ Data937090 ] ;0x00890a41 : a190709300
push ebx ;0x00890a46 : 53
push esi ;0x00890a47 : 56
push edi ;0x00890a48 : 57
mov dword ptr [ ebp + 053Ch ] , eax ;0x00890a49 : 89853c050000
;
; -------------------------------------------------
; VFP 9.0 FIX - RENAME COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the RENAME command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
; mov dword ptr vfpa_copyfile_nottolower,01h
xor ebx , ebx ;0x00890a4f : 33db
xor eax , eax ;0x00890a51 : 33c0
mov ecx , 090h ;0x00890a53 : b990000000
lea edi , dword ptr [ ebp + 01F0h ] ;0x00890a58 : 8dbdf0010000
push ebx ;0x00890a5e : 53
rep stosd ;0x00890a5f : f3ab
mov ecx , dword ptr [ ebp + 0548h ] ;0x00890a61 : 8b8d48050000
pushd 0105h ;0x00890a67 : 6805010000
lea edx , dword ptr [ ebp + 01F0h ] ;0x00890a6c : 8d95f0010000
mov dword ptr [ ebp - 36 ] , ebx ;0x00890a72 : 895ddc
call Fun43d389 ;0x00890a75 : e80fc9baff
;
; -------------------------------------------------
; VFP 9.0 FIX - RENAME COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the RENAME command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
Label890a79 ::
; mov dword ptr vfpa_copyfile_nottolower,00h
Label890a7a ::
push dword ptr [ ebp + 0548h ] ;0x00890a7a : ffb548050000
lea eax , dword ptr [ ebp - 48 ] ;0x00890a80 : 8d45d0
push eax ;0x00890a83 : 50
call Fun434bcf ;0x00890a84 : e84641baff
;
; -------------------------------------------------
; VFP 9.0 FIX - RENAME COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the RENAME command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
; mov dword ptr vfpa_copyfile_nottolower,01h
mov ecx , dword ptr [ ebp + 054Ch ] ;0x00890a89 : 8b8d4c050000
xor eax , eax ;0x00890a8f : 33c0
inc eax ;0x00890a91 : 40
mov edi , eax ;0x00890a92 : 8bf8
lea edx , dword ptr [ ebp - 32 ] ;0x00890a94 : 8d55e0
call Fun43f2b9 ;0x00890a97 : e81de8baff
;
; -------------------------------------------------
; VFP 9.0 FIX - RENAME COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the RENAME command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
Label890a9b ::
; mov dword ptr vfpa_copyfile_nottolower,00h
Label890a9c ::
push dword ptr [ ebp + 054Ch ] ;0x00890a9c : ffb54c050000
lea eax , dword ptr [ ebp - 52 ] ;0x00890aa2 : 8d45cc
push eax ;0x00890aa5 : 50
call Fun434bcf ;0x00890aa6 : e82441baff
lea edx , dword ptr [ ebp - 44 ] ;0x00890aab : 8d55d4
lea eax , dword ptr [ ebp + 0FFFFFF78h ] ;0x00890aae : 8d8578ffffff
call Fun42c27f ;0x00890ab4 : e8c6b7b9ff
push ebx ;0x00890ab9 : 53
push eax ;0x00890aba : 50
call Fun42c2be ;0x00890abb : e8feb7b9ff
cmp eax , ebx ;0x00890ac0 : 3bc3
pop ecx ;0x00890ac2 : 59
pop ecx ;0x00890ac3 : 59
mov dword ptr [ ebp - 40 ] , eax ;0x00890ac4 : 8945d8
jne Label890b9f ;0x00890ac7 : 0f85d2000000
;
; -------------------------------------------------
; VFP 9.0 FIX - RENAME COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the RENAME command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
; mov dword ptr vfpa_copyfile_nottolower,01h
push ebx ;0x00890acd : 53
lea eax , dword ptr [ ebp + 01F0h ] ;0x00890ace : 8d85f0010000
push eax ;0x00890ad4 : 50
call Fun42c953 ;0x00890ad5 : e879beb9ff
;
; -------------------------------------------------
; VFP 9.0 FIX - RENAME COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the RENAME command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
Label890ad9 ::
; mov dword ptr vfpa_copyfile_nottolower,00h
Label890ada ::
cmp eax , ebx ;0x00890ada : 3bc3
jne Label890b9f ;0x00890adc : 0f85bd000000
Label890ae2 ::
inc dword ptr [ ebp - 36 ] ;0x00890ae2 : ff45dc
lea eax , dword ptr [ ebp + 0318h ] ;0x00890ae5 : 8d8518030000
push eax ;0x00890aeb : 50
lea eax , dword ptr [ ebp - 48 ] ;0x00890aec : 8d45d0
push eax ;0x00890aef : 50
lea eax , dword ptr [ ebp + 0430h ] ;0x00890af0 : 8d8530040000
push eax ;0x00890af6 : 50
call Fun42c5c5 ;0x00890af7 : e8c9bab9ff
lea edx , dword ptr [ ebp + 0430h ] ;0x00890afc : 8d9530040000
call Fun49d5c3 ;0x00890b02 : e8bccac0ff
test eax , eax ;0x00890b07 : 85c0
je Label890b16 ;0x00890b09 : 740b
lea ecx , dword ptr [ ebp + 0430h ] ;0x00890b0b : 8d8d30040000
call Fun7c7bf8 ;0x00890b11 : e8e270f3ff
Label890b16 ::
push ebx ;0x00890b16 : 53
lea eax , dword ptr [ ebp + 0430h ] ;0x00890b17 : 8d8530040000
call Fun42d5e0 ;0x00890b1d : e8becab9ff
test eax , eax ;0x00890b22 : 85c0
je Label890b30 ;0x00890b24 : 740a
mov ecx , 084h ;0x00890b26 : b984000000
call Fun544742 ;0x00890b2b : e8123ccbff
Label890b30 ::
lea eax , dword ptr [ ebp + 0318h ] ;0x00890b30 : 8d8518030000
push eax ;0x00890b36 : 50
lea ecx , dword ptr [ ebp - 32 ] ;0x00890b37 : 8d4de0
call Fun75fa7f ;0x00890b3a : e840efecff
lea eax , dword ptr [ ebp + 0318h ] ;0x00890b3f : 8d8518030000
push eax ;0x00890b45 : 50
lea eax , dword ptr [ ebp - 52 ] ;0x00890b46 : 8d45cc
push eax ;0x00890b49 : 50
lea eax , dword ptr [ ebp + 0E8h ] ;0x00890b4a : 8d85e8000000
push eax ;0x00890b50 : 50
call Fun42c5c5 ;0x00890b51 : e86fbab9ff
lea edx , dword ptr [ ebp + 0E8h ] ;0x00890b56 : 8d95e8000000
call Fun49d5c3 ;0x00890b5c : e862cac0ff
test eax , eax ;0x00890b61 : 85c0
je Label890b70 ;0x00890b63 : 740b
lea ecx , dword ptr [ ebp + 0E8h ] ;0x00890b65 : 8d8de8000000
call Fun7c7bf8 ;0x00890b6b : e88870f3ff
Label890b70 ::
lea edi , dword ptr [ ebp + 0E8h ] ;0x00890b70 : 8dbde8000000
lea eax , dword ptr [ ebp + 0430h ] ;0x00890b76 : 8d8530040000
call Fun488609 ;0x00890b7c : e8887abfff
cmp eax , ebx ;0x00890b81 : 3bc3
je Label890b8c ;0x00890b83 : 7407
mov ecx , eax ;0x00890b85 : 8bc8
call Fun544742 ;0x00890b87 : e8b63bcbff
Label890b8c ::
;
; -------------------------------------------------
; VFP 9.0 FIX - RENAME COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the RENAME command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
push edi
push edi
call MoveFileA
Label890b8d ::
;
; -------------------------------------------------
; VFP 9.0 FIX - RENAME COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the RENAME command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
; mov dword ptr vfpa_copyfile_nottolower,01h
lea eax , dword ptr [ ebp + 01F0h ] ;0x00890b8c : 8d85f0010000
call Fun49cced ;0x00890b92 : e856c1c0ff
;
; -------------------------------------------------
; VFP 9.0 FIX - RENAME COMMAND
; December 2017
; -------------------------------------------------
; CCB
;
; In vfp9, the RENAME command always creates the destination file with a lower case file name,
; now it creates the destination file with the user-specified file name.
;
; 2017/12/3, by ccb
;
Label890b96 ::
; mov dword ptr vfpa_copyfile_nottolower,00h
Label890b97 ::
test eax , eax ;0x00890b97 : 85c0
je Label890ae2 ;0x00890b99 : 0f8443ffffff
Label890b9f ::
lea eax , dword ptr [ ebp - 44 ] ;0x00890b9f : 8d45d4
push eax ;0x00890ba2 : 50
lea eax , dword ptr [ ebp + 0FFFFFF78h ] ;0x00890ba3 : 8d8578ffffff
call Fun42d200 ;0x00890ba9 : e852c6b9ff
lea esi , dword ptr [ ebp + 01F0h ] ;0x00890bae : 8db5f0010000
call Fun43e393 ;0x00890bb4 : e8dad7baff
mov ecx , dword ptr [ ebp - 40 ] ;0x00890bb9 : 8b4dd8
cmp ecx , ebx ;0x00890bbc : 3bcb
je Label890bc5 ;0x00890bbe : 7405
call Fun544742 ;0x00890bc0 : e87d3bcbff
Label890bc5 ::
cmp dword ptr [ ebp - 36 ] , ebx ;0x00890bc5 : 395ddc
jne Label890bda ;0x00890bc8 : 7510
mov ecx , dword ptr [ ebp + 0548h ] ;0x00890bca : 8b8d48050000
pushd 0ADh ;0x00890bd0 : 68ad000000
call Fun44d388 ;0x00890bd5 : e8aec7bbff
Label890bda ::
mov ecx , dword ptr [ ebp + 053Ch ] ;0x00890bda : 8b8d3c050000
call Fun42bf1d ;0x00890be0 : e838b3b9ff
pop edi ;0x00890be5 : 5f
pop esi ;0x00890be6 : 5e
pop ebx ;0x00890be7 : 5b
add ebp , 0540h ;0x00890be8 : 81c540050000
leave ;0x00890bee : c9
ret 08h ;0x00890bef : c20800
Now the COPY FILE and RENAME commands create the destination file with the user-specified file name.
4. APPLIES TO:
VFP 6.0.8167.0
VFP 6.0.8961.0 (SP5)
VFP 7.0.0.9262
VFP 7.0.0.9465 (SP1)
VFP 8.0.0.2521
VFP 8.0.0.3117 (SP1)
VFP 9.0.0.2412
VFP 9.0.0.3504 (SP1)
VFP 9.0.0.4611 (SP2)
VFP 9.0.0.5015 (SP2)
VFP 9.0.0.5411 (SP2)
VFP 9.0.0.5721 (SP2)
VFP 9.0.0.5815 (SP2)
VFP 9.0.0.6303 (SP2)
VFP 9.0.0.6602 (SP2)
VFP 9.0.0.7423 (SP2)
The bug has been fixed in VFP Advanced.
5. REFERENCE WEBSITES:
1, baiyujia.com:
http://www.baiyujia.com
http://www.baiyujia.com/vfpdocuments/f_vfp9fix249.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix250.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix346.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix347.asp
2, microsoft.com:
https://connect.microsoft.com/VisualStudio/feedback/details/218023/vfp-8-9-copy-file-and-rename-commands-change-file-names-allways-to-lawercase
https://social.msdn.microsoft.com/Forums/en-US/8bf07ea5-4693-4d97-b6d8-844d6f0a0712/how-can-i-copy-a-file-and-rename-to-upper-case-file-name
https://social.msdn.microsoft.com/Forums/en-US/3192215f-b073-4082-893a-79ca36f36ffd/rename-case-sensitive
3, foxite.com:
https://www.foxite.com/archives/copy-file-changed-case-0000402944.htm
https://www.foxite.com/archives/copy-filerename-changes-cases-to-filenames-0000023778.htm
https://www.foxite.com/archives/copy-file-0000314742.htm
https://www.foxite.com/archives/copy-file-changes-filename-to-lower-case-0000104923.htm
https://www.foxite.com/archives/copy-file-issue-0000428071.htm
https://www.foxite.com/archives/file-copy-issue-0000428069.htm
https://www.foxite.com/archives/renaming-a-file-to-uppercase-0000246959.htm
4, mzvfp.com:
http://www.mzvfp.com/read.php?tid=56306
5, sunyear.com.tw:
http://vfp.sunyear.com.tw/viewtopic.php?t=6848
http://vfp.sunyear.com.tw/viewtopic.php?t=4795
6, berezniker.com:
https://www.berezniker.com/content/pages/visual-foxpro/copy-move-rename-file-preserving-destination-name-case
7, narkive.com:
http://microsoft.public.fox.programmer.exchange.narkive.com/z9Qbft2p/copy-file-changes-file-name-case-to-lower-case
8, devx.com:
http://forums.devx.com/showthread.php?80569-fOXPRO-BUG
9, computer-programming-forum.com:
http://computer-programming-forum.com/2-vfp/3ee2f0a5908c69b3.htm
6. OTHER:
For reference only, there is no guarantees.
Any questions or suggestions, please send me an email at ccb2000@163.com.
|