clippy icon indicating copy to clipboard operation
clippy copied to clipboard

`clippy.write` fails on Windows with "The system cannot find the path specified."

Open jnhyatt opened this issue 5 years ago • 3 comments

I'm running Windows 10 and I have a very simple program that fails to copy text into my clipboard. Here's my MWE:

import 'package:clippy/server.dart' as clippy;

void main() async {
    await clippy.write("joshjosh.josh");
}

Output:

The system cannot find the path specified.

The program then hangs until I force quit.

jnhyatt avatar Nov 17 '19 00:11 jnhyatt

Hello, Try installing the path package, path: ^1.6.4

From Here

PedroMGomes avatar Feb 04 '20 02:02 PedroMGomes

@jnhyatt unfortunately the paths for clipboard "server" are hardcoded (v1.0.0 9ef705f)

https://github.com/andresaraujo/clippy/blob/master/lib/src/server.dart#L74

Currently you can solve your problem only if you place files from this folder https://github.com/andresaraujo/clippy/tree/master/lib/src/backends/windows

in folder relative to your dart file some_folder/clippy_write_example.dart some_folder/lib/src/backends/windows/copy.exe

printminion avatar Aug 12 '20 17:08 printminion

Currently you can solve your problem only if you place files from this folder https://github.com/andresaraujo/clippy/tree/master/lib/src/backends/windows

in folder relative to your dart file some_folder/clippy_write_example.dart some_folder/lib/src/backends/windows/copy.exe

It didn't work for me : S

apoleo88 avatar Nov 22 '20 22:11 apoleo88