pwd
Prev | Orchestra Opcodes and Operators | Next

## pwd

pwd — Asks the underlying operating system for the current directory name as a string.

## Description

Plugin opcode in cs_date.

pwd call the operating system to determine the current directory (folder). pwd runs at i-time only.

## Syntax

    Sres pwd

## Performance

Sres -- the returned string.

## Example

Here is an example of the pwd opcode. It uses the file pwd.csd.

Example 813. Example of the pwd opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

    <CsoundSynthesizer>
    <CsOptions>
    ; Select audio/midi flags here according to platform
    ; Audio out   Audio in
    -odac          ; -iadc    ;;;RT audio I/O
    ; For Non-realtime ouput leave only the line below:
    ; -o system.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

    ; Initialize the global variables.
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1

    instr 1
    ; Waits for command to execute before continuing
    Swd pwd
    puts Swd, 1
    endin

    </CsInstruments>
    <CsScore>

    ; Play Instrument #1 for minimal time.
    i 1 0 0.1
    e

    </CsScore>
    </CsoundSynthesizer>

## Credits

Author: John ffitch
July 2012

New in version 5.18

Prev | Up | Next
pyrun Opcodes | Home | qinf