I'm trying to update an old backup routine to VFP9.
I notice that VFP9 still doesn't preserve case on file names when using the "COPY FILE (from) TO (to)" command, and doesn't honor the case you use in "COPY TO DestFileName.DBF".
I've deduced that:
StrToFile( FileToStr('OriginalFile'), 'DestFile.txt' )
DOES work, but only if DestFile.txt doesn't exist yet.
Of course, StrToFile can't work for files over 16MB in size... does anyone have a (simple.. I don't want to use FOPEN and FWRITE... unless you've already written it...) way to copy files and preserve case?
And a way to "COPY TO" and preserve case?
For now, I'm writing routines that will check (using ADIR) if a file is <16MB, then use FIletostr, Delete file, StrToFile to fix the case.
- Bill
Get the best answers to your questions -- See FAQ481-4875.
I notice that VFP9 still doesn't preserve case on file names when using the "COPY FILE (from) TO (to)" command, and doesn't honor the case you use in "COPY TO DestFileName.DBF".
I've deduced that:
StrToFile( FileToStr('OriginalFile'), 'DestFile.txt' )
DOES work, but only if DestFile.txt doesn't exist yet.
Of course, StrToFile can't work for files over 16MB in size... does anyone have a (simple.. I don't want to use FOPEN and FWRITE... unless you've already written it...) way to copy files and preserve case?
And a way to "COPY TO" and preserve case?
For now, I'm writing routines that will check (using ADIR) if a file is <16MB, then use FIletostr, Delete file, StrToFile to fix the case.
- Bill
Get the best answers to your questions -- See FAQ481-4875.