Deleting Undeletable aux.trc Trend Files and Resolving Reserved DOS Name Errors in PCS 7

Deleting Undeletable aux.trc Trend Files and Resolving Reserved DOS Name Errors in PCS 7

Archiving a SIMATIC PCS 7 project freezing at 'aux.trc' in the WinCC OS project's TRG folder occurs because 'aux' is a reserved MS-DOS device name that Windows Win32 APIs cannot open, archive, or delete normally. WinCC creates 'aux.trc' and 'aux.trg' if an online trend group was named 'aux'. Standard deletion tools, ResetWinCC, and Safe Mode fail because the OS intercepts the filename as the serial auxiliary device. To delete the undeletable file, open an administrative command prompt and use the Win32 device namespace syntax: del "\?\C:\path_to_project\wincproj\OS\TRG\aux.trc". Once deleted, project archiving via PKZip succeeds.

Table of Contents

Why Windows Forbids Standard Access to Files Named 'aux'

When archiving a SIMATIC PCS 7 multiproject using File -> Archive, engineers occasionally experience an indefinite freeze in the PKZip compression engine. Inspecting the progress dialog reveals that the archiver stalls on a file located in the WinCC project directory:

...\wincproj\<OS_Server>\TRG\aux.trc

Attempting to delete or rename aux.trc or aux.trg in Windows Explorer fails with generic errors like 'The specified path is invalid' or 'The parameter is incorrect'. Running del aux.trc in a standard command prompt hangs or returns device errors.

This behavior is an operating system architectural constraint dating back to MS-DOS 1.0. In Windows, certain legacy device identifiers—including AUX (auxiliary device / serial port), CON (console), PRN (printer), and NUL—are reserved system device names. The Windows Win32 subsystem intercepts any file path containing these base names and attempts to open an I/O handle to the physical hardware device rather than the disk file, resulting in an unresolvable file lock.

How WinCC Trend Groups Generate 'aux.trc' and 'aux.trg'

In WinCC with Basic Process Control, operators can configure online trend curve groups in the WinCC TrendControl interface. When an operator saves an online trend group (e.g. naming it 'Aux' or 'aux' for auxiliary boilers or auxiliary systems):

  1. WinCC saves the trend group configuration in the project's TRG (Trend Groups) folder.
  2. The system generates two files per trend group:
    - <TrendGroupName>.trg: Binary trend group definition file.
    - <TrendGroupName>.trc: Associated trend group cache descriptor.
  3. If the group was named aux, WinCC uses lower-level file APIs that bypass Win32 name parsing during creation, successfully writing aux.trc to disk. However, standard user-mode applications (like PKZip, SIMATIC Manager, or Explorer) use high-level Win32 APIs and cannot access or archive the resulting file.

Step-by-Step Procedure to Delete Reserved DOS Files Using Extended Syntax

To force Windows to bypass Win32 reserved name parsing and access the physical disk file directly, use the Extended-Length Win32 Device Namespace prefix (\\?\):

  1. Close All Siemens Applications: Close SIMATIC Manager, WinCC Explorer, and run Reset_WinCC.vbs to ensure no active processes hold file handles.
  2. Open Administrative Command Prompt:
    - Press the Windows key, type cmd, right-click Command Prompt, and select Run as administrator.
  3. Execute Extended Path Deletion:
    - Issue the del command using the exact literal prefix \\?\ before the absolute drive path:
del "\\?\C:\Cielo2\Authoring\wincproj\OS_Server\TRG\aux.trc"
del "\\?\C:\Cielo2\Authoring\wincproj\OS_Server\TRG\aux.trg"
  1. PowerShell Alternative:
    - If using PowerShell, execute:
Remove-Item -LiteralPath "\\?\C:\Cielo2\Authoring\wincproj\OS_Server\TRG\aux.trc" -Force
Remove-Item -LiteralPath "\\?\C:\Cielo2\Authoring\wincproj\OS_Server\TRG\aux.trg" -Force
  1. Archive Multiproject: Open SIMATIC Manager and execute File -> Archive. PKZip completes instantaneously without freezing.

Reserved MS-DOS Device Names and Behavior in SIMATIC PCS 7

The following table lists reserved DOS device names that must never be used for SIMATIC project objects:

Reserved NameOriginal Hardware DeviceImpact if Used in WinCC / PCS 7Extended Namespace Deletion CommandAUXAuxiliary device (Serial COM1)Archiving freezes at aux.trc in TRGdel "\\?\<Path>\aux.*"CONConsole (Keyboard / Display)Cannot create or delete con.pdldel "\\?\<Path>\con.*"PRNPrinter device (LPT1)Printing and archiving scripts freezedel "\\?\<Path>\prn.*"NULNull device (Bit bucket)File writes vanish or lock databasedel "\\?\<Path>\nul.*"COM1 to COM9Serial Communication PortsSerial port driver contentiondel "\\?\<Path>\com1.*"LPT1 to LPT9Parallel Line Printer PortsPrint spooler locking errorsdel "\\?\<Path>\lpt1.*"

[!NOTE]
Commercial Accuracy Notice: Resolving file system locking conflicts caused by reserved Windows device names is a standard > operating system maintenance task. Deleting corrupted trend group descriptors consumes no licenses or Process Objects.

Verification

Verify that the reserved device files have been purged and archiving is restored:

  1. Directory Inspection: In Command Prompt, run dir "\\?\C:\path_to_project\wincproj\OS\TRG\". Confirm that aux.trc and aux.trg are no longer present in the directory.
  2. Multiproject Archive Test: In SIMATIC Manager, execute File -> Archive. Select the multiproject root and choose an archive destination. Confirm that PKZip completes to 100% without pausing.
  3. WinCC TrendControl Verification: Open WinCC Runtime, open the TrendControl screen, and verify that online trend groups load smoothly from the TRG folder.

Limitations and Operational Precautions

Observe these guidelines to prevent reserved name locks:

  1. Operator Naming Policies: Train control room operators never to name saved online trend groups using reserved tokens (use Auxiliary_Boiler instead of aux).
  2. Graphic and Chart Naming: Never name CFC charts, graphic screens (*.pdl), or script files using reserved words (con, aux, prn).
  3. Backup Before Forced Deletion: Always verify the full absolute path when executing del \\?\ commands, as extended device syntax bypasses Windows Recycle Bin and deletes files irreversibly.

Engineer FAQ

Why couldn't I delete aux.trc even in Windows Safe Mode?

Safe Mode still loads the Windows Win32 subsystem. Because AUX is reserved at the operating system kernel level, Win32 APIs treat aux.trc as the serial port regardless of whether Windows is in Safe Mode.

What does the \?\ prefix do?

The \\?\ prefix instructs Windows to bypass all Win32 path parsing, reserved name checks, and maximum path length limits (MAX_PATH 260 chars), passing the path directly to the NTFS file system driver.

Will deleting aux.trc corrupt my WinCC project?

No. The files in the TRG folder are user-saved online trend curve groups. Deleting aux.trc and aux.trg only removes that single saved curve view; the underlying logged process data in SQL Server remains 100% intact.

Why did PKZip freeze on this file specifically?

When PKZip attempted to open aux.trc for reading, Windows attempted to read data from the serial port AUX. Because no device was sending data on the serial port, the read call blocked indefinitely.

Technical References

Related Articles

Related Tags

  • aux.trc
  • Reserved DOS Names
  • TRG Folder
  • TrendControl
  • PKZip Freeze
  • Extended Namespace
6 respuestas