See
http://www.berezniker.com/content/pages/visual-foxpro/copy-move-rename-file-preserving-destination-name-case>I am working on a program to prepend a two-letter year code onto an existing file name and then replace the file name.
>
>
>SET DEFAULT TO "C:\Documents and Settings\pthomas\Desktop\0111"
>
>numberoffiles=ADIR(gaFileList,'*.pdf')
>FOR nCount=1 TO numberoffiles
>
>OldName=gafilelist(ncount,1)
>YearCode=substr(oldname,3,2)+"_"
>Newname=upper(yearcode+oldname)
>RENAME (oldname) to (newname)
>
>ENDFOR
>
>
>This works fine except the resulting file name is lower case, whereas the original file name was uppercase. For example, 10AP22B.PDF should become AP_10AP22B.PDF but instead I get ap_10ap22b.pdf.....regardless of what I do with the upper command.
>
>Suggestions?
--sb--