3

Our FoxPro for DOS 2.6 (FPD) application apparently is not able to see filenames longer than 8 characters when run on Windows XP Pro or Win 7 (32-bit) stations over Small Business Server 2011 running on a base platform of SBS 2008, both 64-bit. We had previously tested the FPD app successfully on SBS 2008, 64-bit. Our Op Sys/Server IT guys say the placement of SBS 2011 in between should make no difference.

As the Windows software has been upgraded around the FPD application (and it moved further from DOS), we've run into similar filename reference issues where we needed to take long folder and filenames like "My Documents" and show them as "MyDocu~1". At that time, Cmd (the DOS-like Windows Command window) would also recognize that shortened reference. But now, Cmd recognizes only the full, long names. If you open an Open File dialog in Fox, only files/folders having short (8-char) names will show. Trying to open a file with a long filename will cause a not found error.

Can anyone say why our original 64-bit test showed different results and what the easiest fix would be?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
zeoj
  • 33
  • 3

1 Answers1

2

fsutil 8dot3name set 0 will enable the creation of short file names on all volumes. You will need to reboot after this command has been run from an elevated command prompt. This technet article covers what it changes behind the scenes and what other options are available.

By default, newer versions of Windows, apparently including SBS2011, don't ship with 8.3 file name creation enabled.

Keep this snippet from that article in mind:

Changing this value does not change the file, but it does change the way that NTFS displays and manages the file. Also, files are named according to whatever rule is specified by this entry at the time of their creation; changing this entry does not alter the names of existing files.

You will need to re-create any files that your FPD application will need to access. A copy and paste should probably be enough.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
  • No problem. If this answer resolves your issue, don't forget to upvote it and click the check mark to accept it, so that future visitors know that this is a solution. – MDMarra Nov 02 '12 at 02:41
  • Thank you for responding. I was hoping to avoid re-coding as I use long folder names in multiple places. This solution sounds like it addresses naming consistency from inside and outside Fox, but I'll still need to change all name references, whether in or out. Also, I read that it applies only to Win 7 and not to our XP stations. If I need to change all the long-name references, why wouldn't I just do so manually? There are few. New file creation is not an issue. Most names already comply with 8,3. But, I'd need to run down all the name changes in the code and retest. Thx, jz – zeoj Nov 02 '12 at 02:55
  • Sorry, I'm not following what you're saying. – MDMarra Nov 02 '12 at 10:32
  • Yes, you were right. This is what we needed. Sorry, I didn't get it before. But we used it today. Thank you -jz – zeoj Nov 03 '12 at 04:34