0

I wrote a file called cp.bat and the content of this file is: DOSKEY cp=COPY $* copy. I saved this file in c:\users\myname\aliases. I also added this path to my environment so cmd can execute it.

When I now type cp in my cmd the output is a strange character for the c in cp.

enter image description here

I need this script to work because I want to install chicken scheme eggs on my machine, but the chicken-install command executes multiple cp commands and those are not recognized in the cmd.

I also tried to alter the build script of the eggs, but it gets newly generated everytime I call the chicken-install command.

It would also help if someone could explain me how to install chicken eggs on a windows machine correctly. I feel this workaround shouldn't be necessary. Thanks in advance.

Magoo
  • 77,302
  • 8
  • 62
  • 84
Echon
  • 61
  • 5
  • In all probability, your editor is the root of your problem. Batch files should be created in strict ANSI format using a text-editor, not a word-processor. `Notepad` is barely adequate; `Notepad++` is far better - I use `Editplus` – Magoo Jan 04 '21 at 03:02
  • You were completely right. I opened it in notepad++ and the encoding was set to UTF-8-BOM, I put it to ANSI and saved it. Now it works fine. Thanks a lot. – Echon Jan 04 '21 at 03:07

2 Answers2

0

Like Magoo mentioned:

In all probability, your editor is the root of your problem. Batch files should be created in strict ANSI format using a text-editor, not a word-processor. Notepad is barely adequate; Notepad++ is far better - I use Editplus

The encoding was messed up and it was set to UTF-8-BOM, so I changed it to ANSI and it worked flawlessly.

Echon
  • 61
  • 5
0

If you're using CHICKEN 5, it should not be emitting cp commands; it should emit batch files which use the builtin Windows commands only if you're using the mingw platform target. Have you used the PLATFORM=mingw option with every make invocation?

If you're using the mingw-msys (or cygwin) platform, then it will be emitting UNIX style commands.

sjamaan
  • 2,282
  • 10
  • 19