# Custom command argument quoting not working

**URL:** https://discussion.mcebuddy2x.com/t/custom-command-argument-quoting-not-working/668
**Category:** Custom Commands
**Tags:** commonissues
**Created:** [September 27, 2017, 3:10pm UTC](https://discussion.mcebuddy2x.com/t/custom-command-argument-quoting-not-working/668 "2017-09-27T15:10:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rwhapham](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/rwhapham/32/681_2.png) [@rwhapham](https://discussion.mcebuddy2x.com/u/rwhapham)
#### Post date: [September 27, 2017, 3:10pm UTC](https://discussion.mcebuddy2x.com/t/custom-command-argument-quoting-not-working/668/1 "2017-09-27T15:10:04Z")

</div>

**Request Type:**  
BUG

**MCEBuddy Version and Type (32bit or 64bit):**  
MCEBuddy 2.4.7 32bit

**Operating System and Type (32bit or 64bit):**  
Windows 7 Professional 32-bit

**Summary of the problem or suggestion:**  
I had been using the MCEBuddy 2.4.7 32bit - 20170627 beta release with a profile that uses custom commands. Since upgrading to the release of 2.4.7, those commands no longer properly quote the arguments passed to the custom commands. From my profiles.conf:

```
PoseCustomCommandPath=C:\Resources\TvRecordingMover.exe
PostCustomCommandParameters="source="%convertedfile%" orig="%sourcefile%" delete=true"

```

In the 20170627 release, the parameters would come through with the quotes (e.g., TvRecordingMover.exe source=“D:\Output\Some File.mkv” orig=“D:\DVR\Some File.mkv” delete=true). After updating, the parameters no longer have quotes (e.g., TvRecordingMover.exe source=D:\Output\SomeFile.mkv orig=D:\DVR\SomeFile.mkv delete=true), which causing parsing errors with files that contain spaces (which is all of them). Did something change? Thanks.

---

<div class="post-metadata">

### Author: ![RBoy](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@RBoy](https://discussion.mcebuddy2x.com/u/RBoy)
#### Post date: [September 27, 2017, 3:11pm UTC](https://discussion.mcebuddy2x.com/t/custom-command-argument-quoting-not-working/668/2 "2017-09-27T15:11:30Z")

</div>

attach the conversion log

---

<div class="post-metadata">

### Author: ![rwhapham](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/rwhapham/32/681_2.png) [@rwhapham](https://discussion.mcebuddy2x.com/u/rwhapham)
#### Post date: [September 27, 2017, 3:36pm UTC](https://discussion.mcebuddy2x.com/t/custom-command-argument-quoting-not-working/668/3 "2017-09-27T15:36:46Z")

</div>

> [@RBoy](#):
>
> attach the conversion log

Of course, when I reverted back to the last working version for me, my old conversion logs were removed. I’ll have to recreate with the release version during some downtime.

---

<div class="post-metadata">

### Author: ![RBoy](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@RBoy](https://discussion.mcebuddy2x.com/u/RBoy)
#### Post date: [September 30, 2017, 12:42pm UTC](https://discussion.mcebuddy2x.com/t/custom-command-argument-quoting-not-working/668/4 "2017-09-30T12:42:48Z")

</div>

There’s no change, the parameters are being passed exactly as specified in the [custom command](https://discussion.mcebuddy2x.com/t/mcebuddy-advanced-settings-commands-and-tweaking/30#customcommands).

Try to remove the extra quotes around the command parameters, it should look like this:

> PostCustomCommandPath=C:\Resources\TvRecordingMover.exe  
> PostCustomCommandParameters=source=“%convertedfile%” orig=“%sourcefile%” delete=true

Each program processes the inputs parameters and quotes in a different way, some can’t handle total wrapping of quotes while others can’t handle nested quotes.

For example, when using command line, windows always connects the quotes in pairs and breaks the parameters at the next next space, so when you’re using the following command line parameters:

> “source=”%convertedfile%" orig=“%sourcefile%” delete=true"

Windows command line will translate that into the following parameters:

```
"source="C:\Users\Public\Videos\Continuum\Season
01\S01E09-Family
Time.mp4" orig="C:\Users\ramit\Desktop\Continuum
-
S01E9
-
2015-02-25.ts" delete=true"

```

However when you use (without the leading and ending quotes):

> source=“%convertedfile%” orig=“%sourcefile%” delete=true

Windows command line will translate that into:

```
source
"C:\Users\Public\Videos\Continuum\Season 01\S01E09-Family Time.mp4"
orig
"C:\Users\ramit\Desktop\Continuum - S01E9 - 2015-02-25.ts"
delete
true

```
