[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1081
  • Last Modified:

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
0
aescribens
Asked:
aescribens
  • 2
1 Solution
 
_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
 
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

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now