---
name: "_chdir"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "0.9.25-2.1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/_chdir"
---

# \_chdir(3w)

## NAME

**\_chdir** (MSVCRT.@)

## SYNOPSIS

int CDECL  \_chdir\
  (\
   const char\* *newdir*\
  )

## DESCRIPTION

Change the current working directory.

## PARAMS

*newdir* **\[In\]**  Directory to change to.

## RETURNS

**Success:** **0.** The current working directory is set to *newdir*.

**Failure:** **-1.** errno indicates the error.

## NOTES

See **[SetCurrentDirectoryA(3w)](/SetCurrentDirectoryA/3w.md)**.

## IMPLEMENTATION

Defined in **"tchar.h"**.

Implemented in **"dlls/msvcrt/dir.c"**.

Debug channel **"msvcrt"**.
