---
name: "zip_set_file_comment"
section: "3"
platform: "linux"
package: "libzip"
version: "1.11.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/zip_set_file_comment"
---

# zip\_set\_file\_comment(3)

set comment for file in zip (obsolete interface)

## NAME

**zip\_set\_file\_comment** – set comment for file in zip (obsolete interface)

## LIBRARY

libzip (-lzip)

## SYNOPSIS

**#include \<zip.h\>**

*int*\

**zip\_set\_file\_comment**(*zip\_t \*archive*, *zip\_uint64\_t index*, *const char \*comment*, *int len*);

## DESCRIPTION

The **zip\_set\_file\_comment**() function is the obsolete version of [zip\_file\_set\_comment(3)](/zip_file_set_comment/3.md). The only differences are the type of the *len* argument and the additional *flags* argument. **zip\_set\_file\_comment**() is the same as calling [zip\_file\_set\_comment(3)](/zip_file_set_comment/3.md) with an empty *flags* argument.

## SEE ALSO

[libzip(3)](/libzip/3.md), [zip\_file\_set\_comment(3)](/zip_file_set_comment/3.md)

## HISTORY

**zip\_set\_file\_comment**() was added in libzip 0.7. In libzip 0.10 the type of *index* was changed from *int* to *zip\_uint64\_t*. It was deprecated in libzip 0.11, use **zip\_file\_set\_comment**() instead.

## AUTHORS

Dieter Baron ⟨*dillo@nih.at*⟩ and Thomas Klausner ⟨*wiz@gatalith.at*⟩
