---
name: "NJB_Delete_Datafile"
section: "3"
platform: "linux"
package: "libnjb1-doc"
version: "1.1-2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/NJB_Delete_Datafile"
---

# NJB\_Delete\_Datafile(3)

Delete a data file from the NJB

## NAME

NJB\_Delete\_Datafile - Delete a data file from the NJB

## LIBRARY

libnjb

## SYNOPSIS

\#include \<sys/types.h\> #include \<libnjb.h\>

extern int njb\_error

int NJB\_Delete\_Datafile (njb\_t **\*njb**, u\_int32\_t **fileid**)

## DESCRIPTION

This function deletes a data file from the NJB.  The ID of the file to be deleted is passed in the **fileid** parameter. Data files are not music tracks, but general data storage containers on the jukebox.

This function also increments the NJB's library counter, provided it has not been incremented previously during the session.

## RETURN VALUES

This function returns 0 on success.  If a failure occurs, it returns -1 and sets **njb\_error**

- EO\_BADCOUNT

  The file was successfully deleted, but the NJB's library counter could not be updated.

- EO\_BADSTATUS

  The NJB returned a non-zero status.  The file was not deleted.

- EO\_USBCTL

  An I/O error occurred on the control pipe.  The file was not deleted.
