.PRG

Файл PRG

xBase Program Source File
Задать вопрос
БЫСТРЫЙ ОТВЕТ

A PRG file is plain-text source code written in the xBase language used by dBASE, FoxPro, Clipper, and their descendants. Any text editor opens it for reading; to run or compile it you need the matching tool: Visual FoxPro (discontinued 2007), dBASE, or the open-source Harbour compiler. The file itself is safe to open in an editor, but do not run untrusted code without reading it first.

Разработчик: Originated with dBASE (Ashton-Tate); used by FoxPro/Visual FoxPro (Microsoft), Clipper, Harbour, xHarbour Категория: Файлы разработчика Открыть стандартное MIME: text/plain
ОТКРЫВАЕТСЯ НА Windows macOS Linux
Связанные: .DO · .MD · .HEX · .XSD

На этой странице

Проиндексировано расширений: 19k+
Последняя проверка: Aug 13, 2026

Не знаете, что это за файл?

Перетащите любой файл в наш идентификатор - мы прочитаем первые байты, чтобы определить формат.

Идентифицировать файл

Что такое формат файла PRG?

.prg is a source-code file associated primarily with the xBase family of database-programming languages, including dBASE, FoxPro, Visual FoxPro, Clipper, and the modern open-source Harbour compiler. A .prg file is also a generic extension used by various programs to store macros or program instructions; such files are not standardized and serve different purposes depending on the application.

In its dominant xBase role, a .prg stores plain-text source code - not binary data - making it readable in any text editor. A typical program begins with comment lines (prefixed with * or &&), SET directives, and PROCEDURE/FUNCTION blocks that operate on .dbf database tables. When compiled, FoxPro produces a binary .fxp object file, while Clipper and Harbour generate a native executable; the .prg source itself is always human-readable. The xBase language traces back to dBASE II/III in the early 1980s and dominated desktop-database programming through the 1990s. Visual FoxPro 9.0 SP2 (2007) was the last major commercial release; the language lives on through the open-source Harbour project.

.prg files are sometimes used by programmers or university lecturers for educational or testing purposes. Such files may store pseudocode - an informal, high-level description of a computer program or algorithm in plain text. Pseudocode is an abstraction, not an implementation, of a computer program; it contains standard control instructions such as loops or conditional expressions in human-readable rather than machine-readable format. Pseudocode is language-independent and cannot be executed on a computer. .prg files are sometimes chosen for pseudocode precisely because the extension does not refer to any actual programming language.

Безопасность и защита

РИСК: MEDIUM

A .prg is plain-text source code, so the file itself can't execute by being opened in an editor - reading one is safe. The risk is in what it does when run/compiled: xBase code can run shell commands (RUN/!), read and write database files, and delete data, so don't blindly DO or compile an untrusted .prg. Read the source first, run legacy apps in an isolated/VM environment, and be wary of programs that touch .dbf data you care about. (The unrelated GEM/Atari .prg is a true binary executable - treat any .prg that is binary, not text, with extra caution.)

Детали формата

в двух словах
ПОЛНОЕ НАЗВАНИЕxBase Program Source Fileтакже известен как FoxPro program file, Clipper/dBASE program source
РАЗРАБОТЧИКOriginated with dBASE (Ashton-Tate); used by FoxPro/Visual FoxPro (Microsoft), Clipper, Harbour, xHarbourс early 1980s with dBASE II/III; adopted by FoxPro, Clipper and later Visual FoxPro
MIME-ТИПtext/plain
ТИПPlain-text source code in the xBase (dBASE/FoxPro/Clipper) language
СТАНДАРТОткрытый · без роялти
СВЯЗАННЫЕ.do.md.hex.xsd
Это расширение также используется в…
  • GEM / Atari ST program - On Atari ST and GEM/DOS, .prg is an executable PROGRAM file (a true binary), not source code.
  • Lotus 1-2-3 / Symphony program - Some Lotus and other DOS-era apps used .prg for macro/program scripts.
  • MicroSim PCBoard / WAVmaker file - A few engineering and music tools reused .prg for their own data; rare and unrelated to xBase.

Программы, открывающие файлы PRG

Windows5 apps
dBASE Платно Open and run/compile the .prg in dBASE (dBASE PLUS) where the code is dBASE-dialect.
Notepad Открытый код Open the .prg to read/edit the source as text; an xBase/Clipper syntax-highlighting UDL can be added.
Visual Studio Code Бесплатно Open the .prg; install a FoxPro/Harbour language extension for syntax highlighting.
Microsoft Visual FoxPro (legacy) Платно Open the project and run/modify the .prg, or compile it (DO program.prg / build to .app/.exe). Discontinued 2007 - legacy use only.
Harbour compiler Открытый код Compile the xBase source: 'harbour program.prg' then link into a native executable (hbmk2 program.prg).
macOS2 apps
Visual Studio Code Бесплатно Open the .prg; install a FoxPro/Harbour language extension for syntax highlighting.
Harbour compiler Открытый код Compile the xBase source: 'harbour program.prg' then link into a native executable (hbmk2 program.prg).
Linux2 apps
Harbour / xHarbour Открытый код Compile and link the .prg into a native Linux executable (hbmk2 program.prg); the main way to keep xBase apps alive today.
Any text editor (gedit, VS Code, Vim) Бесплатно Open the .prg as plain text to read or edit the source.

Технические подробности

глубокая спецификация
File typePlain-text xBase (dBASE/FoxPro/Clipper) source code
MIME typetext/plain; also seen as text/x-prg
Character encodingASCII / Windows-1252 for Western locales; legacy OEM DOS codepage in older Eastern European files
File signature (magic bytes)None - plain text with no binary header; programs typically open with comment lines (* or &&), SET directives, or a PROCEDURE/FUNCTION declaration
Typical file size1 KB to a few hundred KB of source text
Compilation outputFoxPro/VFP compiles .prg to a binary .fxp object file; Clipper and Harbour compile to a native executable
Companion data format.dbf - xBase programs are tightly coupled to dBASE table files for data storage and retrieval
CompressionNone in source form
Encryption / distributionSource .prg is unencrypted plain text; FoxPro can encrypt compiled .app output for commercial distribution
Language dialect variantsdBASE III/IV, FoxPro 2.x, Visual FoxPro 6-9 (OOP extensions), Clipper 5.x, Harbour, xHarbour - same .prg extension with subtly differing syntax
Comment syntaxLine comments begin with * (asterisk at line start) or && (inline); NOTE keyword is also valid
Object-oriented supportVisual FoxPro introduced DEFINE CLASS / ENDDEFINE blocks inside .prg files, enabling OOP alongside procedural code
Control flow keywordsIF/ENDIF, DO WHILE/ENDDO, FOR/NEXT, DO CASE/ENDCASE, SCAN/ENDSCAN - xBase-specific syntax
OS supportOriginally DOS and Windows (dBASE, FoxPro, VFP); Harbour enables Linux and macOS compilation from the same .prg source
Current ecosystemCommercial tools discontinued (Visual FoxPro 9.0 SP2 was the last, 2007); actively maintained via open-source Harbour and xHarbour projects
Выпущенearly 1980s with dBASE II/III; adopted by FoxPro, Clipper and later Visual FoxPro
Последняя версияVisual FoxPro 9.0 SP2 (2007) was the last major host; the language lives on in open-source Harbour
Открыть стандартноеДа · без роялти
Спецификацияlearn.microsoft.com

Конвертации PRG

Вопросы и ответы сообщества

спрошено пользователями
Задать быстрый вопрос
Получите помощь от людей, работающих с файлами PRG. Будьте конкретны - укажите вашу систему и версию ПО.
Аккаунт не нужен · ответы обычно в течение дня

Вопросов пока нет - станьте первым, кто спросит о файлах PRG.

Часто задаваемые вопросы

What is a .prg file?
Most commonly it's xBase program source code - text written in the dBASE/FoxPro/Clipper database language to build database applications. It's plain text and works alongside .dbf data tables.
How do I open a .prg file?
To read or edit it, open it in any text/code editor (Notepad++, VS Code). To run or compile it you need its host: Visual FoxPro (legacy), dBASE, Clipper, or the open-source Harbour compiler.
How do I run or compile a .prg file?
In Visual FoxPro, DO program.prg runs it and COMPILE/build produces .fxp/.app/.exe. With Clipper or Harbour, compile and link it into a native executable (e.g. hbmk2 program.prg). You need the matching development tool.
Can I open a .prg without FoxPro?
Yes for reading - it's plain text, so any editor shows the code. To actually execute it without FoxPro, use the open-source Harbour/xHarbour compiler (Windows/Linux/macOS), which builds the same xBase source.
Is .prg the same as an .exe?
No - .prg is the source code; an .exe is the compiled program. FoxPro turns a .prg into .fxp then .app/.exe; Clipper/Harbour compile .prg straight to a native .exe.
Why is my .prg file binary/unreadable instead of code?
Then it's probably not xBase source. .prg is also used by unrelated formats - notably GEM/Atari ST executable programs (true binaries) and a few others. A binary .prg won't open as text; identify the source program from where the file came.

Ссылки

1Microsoft Learn - Visual FoxPro documentation (archived)learn.microsoft.com
2Wikipedia - xBase (dBASE/FoxPro/Clipper language family)en.wikipedia.org

Узнать больше

по всей базе данных

Популярные расширения на этой неделе

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.EXEWindows Executable (Portable Executable)
4.PARTPartial Download File
5.BINCD/DVD Disc Image (BIN/CUE)
6.DATProgram Data File (generic)
7.RPMSGRestricted Permission Message
8.MDMarkdown Document
9.TXTPlain Text File
10.NOMEDIAAndroid No-Media Marker File

Похожие расширения

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Бесплатные инструменты для файлов

Идентификатор файлов и конвертер изображений в браузере - все работает на вашем устройстве.

Открыть инструменты

Обзор расширений файлов A-Z