Re: [exec] Executed command can't open file argument
On Thu, May 3, 2018 at 4:34 PM, sebbwrote: > On 3 May 2018 at 17:18, Mark Trolley wrote: > It may be that quotes are being added to the parameter - I assume the > file name does not have quotes. > > Quoting is necessary for protecting spaces on a shell command-line, > but not when the parameters are being passed directly to a program as > separate parameters. > This lead me to the solution, I had to use addArgument with handleQuoting set to false and it started working. Thanks everyone for your help. > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [exec] Executed command can't open file argument
Mark- 1)get an OS that supports spaces in filenames 2)OR use quote to delimit file name e.g. "file name.ext" https://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/filequot.htm HTH Martin __ From: Mark TrolleySent: Thursday, May 3, 2018 11:30 AM To: Martin Gainty Subject: Re: [exec] Executed command can't open file argument You're absolutely right in that it was the spaces in the filename. If I rename the file without spaces it works correctly. By the way I am running this on a Mac, though I didn't think that would make any difference. Is there any workaround other than renaming the file to get it to handle spaces in the name? I need them formatted that way because I parse the name to detect the show name, season number, and episode number to look up metadata. On Tue, May 1, 2018 at 5:35 PM, Martin Gainty > wrote: MG>please see below MG>some file systems cannot read either long filenames or filenames with spaces MG>what happens if you shorten up testing_mp4 to TESTIN~1 and shorten Futurama - S05E01.mp4 to Futurama.mp4 ? MG>check acl/cacls permissions MG>for the user that you use to run AtomicParsley has permissions to read MG>/Users/mtrolley/testing_mp4/Futurama - S05E01.mp4 ? Thanks in advance for any help.
Re: [exec] Executed command can't open file argument
On 3 May 2018 at 17:18, Mark Trolleywrote: > I'm not sure how to respond to my own thread so I am hoping sending a > reply to my own sent message will do it. > > I experimented and discovered the problem is in the spaces in the > filename argument. If the file is renamed to not have spaces the > execution succeeds. However, this doesn't work for my usecase because > I want to parse the filename for information to get metadata I'll use > later. It may be that quotes are being added to the parameter - I assume the file name does not have quotes. Quoting is necessary for protecting spaces on a shell command-line, but not when the parameters are being passed directly to a program as separate parameters. It would be useful to know if the AtomicParsley app puts quotes around file names in error messages. I seem to remember some issues with inappropriate quoting of parameters a long time ago, but I thought they had been resolved. Maybe not. Or maybe the issue is with the substitution map processing - can you try without that? Might also be worth trying the command-line approach. BTW for checking parameters a script is not ideal because the shell may get involved. It's easy enough to write a Java program to print out its parameters (or use one of the scripting languages). That should behave closer to the AtomicParsley app. > @Guang Chao - I can't respond directly to your message because I > didn't receive it in my mail, but I changed the command being executed > to "/usr/bin/whoami" and confirmed that the Java code is running as my > user, so there is no permission issue. > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [exec] Executed command can't open file argument
I'm not sure how to respond to my own thread so I am hoping sending a reply to my own sent message will do it. I experimented and discovered the problem is in the spaces in the filename argument. If the file is renamed to not have spaces the execution succeeds. However, this doesn't work for my usecase because I want to parse the filename for information to get metadata I'll use later. @Guang Chao - I can't respond directly to your message because I didn't receive it in my mail, but I changed the command being executed to "/usr/bin/whoami" and confirmed that the Java code is running as my user, so there is no permission issue. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org