Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: invalid command when using --input-file #298

Open
DasHammett opened this issue Mar 2, 2022 · 2 comments
Open

Error: invalid command when using --input-file #298

DasHammett opened this issue Mar 2, 2022 · 2 comments

Comments

@DasHammett
Copy link

Hi,

I have created a script to upload files into Android, mainly music. The script has the following structure:

"cd Music" "put ./AC_DC/Back\ In\ Black/04\ Givin\ The\ Dog\ A\ Bone.mp3"
"cd Music" "put ./Dream\ Theater/2007\ -\ Falling\ Into\ Infinity\ Demos\ 1996-1997/Disc\ II/07\ -\ Speak\ To\ Me.mp3"
"cd Music" "put ./The\ Smiths/1986\ -\ The\ Queen\ Is\ Dead\ (Japan\ MiniLP\ WPCR-12441)/08\ -\ Vicar\ In\ A\ Tutu.mp3"
"cd Music" "put ./Zbigniew\ Preisner/When\ a\ Man\ Loves\ a\ Woman/08\ Dressing\ Casey.mp3"
"cd Music" "put ./Oasis/Be\ Here\ Now/01\ D'You\ Know\ What\ I\ Mean_.mp3"
"cd Music" "put ./The\ Kenny\ Wayne\ Shepherd\ Band/2011\ -\ How\ I\ Go\ (Special\ Edition)/06.\ Oh,\ Pretty\ Woman.mp3"
"cd Music" "put ./Two\ Steps\ From\ Hell/Ashes/05\ Crawlspace.mp3"
"cd Music" "put ./Mecano/Retitled/02\ Permanent\ Revolt.mp3"
"cd Music" "put ./Dire\ Straits/On\ Every\ Street/10\ My\ Parties.mp3"
"cd Music" "put ./Bruce\ Springsteen/Letter\ To\ You/02.\ Letter\ To\ You.mp3"
"cd Music" "put ./Das\ Ich/Lava-Feuer/08\ Seele\ tanzt.mp3"
"cd Music" "put ./The\ Real\ McKenzies/The\ Real\ McKenzies/02\ Loch\ Lomond.mp3"
"cd Music" "put ./Mono\ Inc/2017\ -\ Together\ Till\ The\ End/16\ -\ Children\ Of\ The\ Dark\ (Faderhead\ Remix).mp3"

When I call aft-mtp-cli --input-file <filename> I get errors:
error: invalid command cd Music

However, if I copy-paste each line individually, the transfer is successful:
aft-mtp-cli "cd Music" "put ./Dire\ Straits/On\ Every\ Street/10\ My\ Parties.mp3"

I could not find any documentation on the proper use of --input-file or how to properly format it

@whoozle
Copy link
Owner

whoozle commented Apr 7, 2022

I think you don't have to cd on every line, just do it once.

--input-file basically reopens stdin with your file, so it's synonymous to aft-mtp-cli < your-file

@DasHammett
Copy link
Author

Thanks for the suggestions,

I still get the same errors...

Following your suggestion, now the script has the following structure

"cd Music"
"put /mnt/Multimedia/Musica/Gojira/2003\ -\ The\ Link\ (Re-Release\ -\ 2005)/11\ -\ Dawn.mp3"
"put /mnt/Multimedia/Musica/Gojira/2003\ -\ The\ Link\ (Re-Release\ -\ 2005)/05\ -\ Torii.mp3"
"put /mnt/Multimedia/Musica/Charles\ Trenet/Effroyables\ Jardins/13\ Y'a\ d'la\ joie.mp3"
"put /mnt/Multimedia/Musica/Mark\ Knopfler/Screenplaying/05\ The\ Long\ Road.mp3"

But I still get the same errors:

error: invalid command cd Music
error: invalid command put /mnt/Multimedia/Musica/Gojira/2003 - The Link (Re-Release - 2005)/11 - Dawn.mp3
error: invalid command put /mnt/Multimedia/Musica/Gojira/2003 - The Link (Re-Release - 2005)/05 - Torii.mp3
error: invalid command put /mnt/Multimedia/Musica/Charles Trenet/Effroyables Jardins/13 Y'a d'la joie.mp3
error: invalid command put /mnt/Multimedia/Musica/Mark Knopfler/Screenplaying/05 The Long Road.mp3

@DasHammett DasHammett reopened this Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants