-3

Hi there i am trying to run a quite commplicated cmd command in python but i keep on getting the error in the title! Here's the command:

os.system('cmd /c dotnet DicordChatExporter.CLI\DiscordChatExporter.CLi.dll export -t "[insert discord token here]" -c 939905115505180682 -o C:\Users\Danny\DiscordExports\log.txt -f PlainText')
dan Man771
  • 41
  • 8

1 Answers1

1

\ has special meaning in python strings, so you need escape it by doubling to get literal \, all \ in all paths should be replaced using \\, for example

C:\Users\Danny\DiscordExports\log.txt

should be

C:\\Users\\Danny\\DiscordExports\\log.txt
Daweo
  • 31,313
  • 3
  • 12
  • 25