PathName on Windows

Hi all,

Could anybody please help me with evaluating this particular piece of code on a Windows machine?

    ~audiofolder = PathName(thisProcess.nowExecutingPath).pathOnly+/+"audio";
    ~buf = Dictionary.new;
    PathName(~audiofolder).folders.do({|folder|
        ~buf[folder.folderName.asSymbol] = SoundFile.collectIntoBuffers(folder.asAbsolutePath+/+"*");
        folder.postln;
    });

It presupposes that the current document is inside a folder with the following structure:

├── 00-firsttest.scd
└── audio
    ├── scratch
    │   ├── scratch-01.wav
    │   ├── scratch-02.wav
    │   ├── scratch-03.wav
    ├── squeak
    │   ├── squeak-01.wav
    │   ├── squeak-02.wav
    │   ├── squeak-03.wav
    └── voices
        ├── voices-01-2.wav
        ├── voices-01.wav
        ├── voices-02-2.wav
        ├── voices-02.wav
        ├── voices-03-2.wav
        ├── voices-03.wav
        ├── voices-04-2.wav

The code works fine on Linux and macOS, but I haven’t been able to test it on windows, and I need it to teach in about 45 minutes :smiley:

A bit later than 45 minutes :upside_down_face: but I just tested it and it works fine on Windows 10, with SC 3.11.2. (the server needs to be booted for SoundFile.collectIntoBuffers to work, but that’ll be true on any platform)

1 Like

Very welcome, nevertheless, even if it’s a bit later than 45 minutes. Thanks for testing the code :slight_smile: Very useful!