CFExecute CMD.EXE - Copy to Merge 2 MPG Video Files

Hello Experts,

I need some assistance with running the cfexecute command to merge 2 MPG video files into 1.

File1.mpg = 476KB
File2.mpg = 12,670KB

I need to achieve the following using CFExecute:  File3.mpg = 13,145KB  (combination of files 1 & 2).

When I run the following command in the CMD Prompt, I works perfectly:

copy /b c:\File1.mpg + File2.mpg File3.mpg

When I run the following CFExecute command, I only achieve File3.mpg with 476KB:

<cfexecute name = "C:\Windows\System32\cmd.exe" arguments = "/c copy /b File1.mpg + File2.mpg File3.mpg"
outputFile = "C:\"
timeout = "900">
</cfexecute>

-----------------------------------------------------------------------------------------------

What am I doing wrong?  :)

- Anthony
LVL 1
aescribensAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

_agx_Commented:
I don't know if it actually merges the files, but this does produces the correct file size for me. Note, if the real path has spaces in it, you may need to quote the paths.

<cfexecute name = "C:\Windows\System32\cmd.exe" arguments = "/c copy /b c:\File1.mpg + c:\File2.mpg c:\File3.mpg"
outputFile = "C:\"
timeout = "900">
</cfexecute>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aescribensAuthor Commented:
Hey agx,

I realized what my error was after I read your response.  Basically, I was referencing the incorrect File2.mpg, one that I had not formated in a similar fashion as File1.mpg.  This is the reason I was not getting the expected result for File3.mpg.  :)

Thanks,
Anthony
0
_agx_Commented:
Ah, okay.  It's probably not a bad idea to use full paths for the files though. Otherwise they might not be found, or the File3.mpg might end up somewhere different than you think ie in the C:\Windows\System32\ directory.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.