Computing.Net > Forums > Windows Vista > Apply Batch To a File By Open With

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Apply Batch To a File By Open With

Reply to Message Icon

Name: blazerqb14
Date: December 24, 2008 at 08:18:00 Pacific
OS: Windows Vista Home Premiu
CPU/Ram: 2.66 Core2Duo 2GB
Product: Of what exactly? / OF WHAT EXACTLY?
Comment:

Is it possible to apply script in a batch file to another file, such as a video file, by using Windows's "Open With" to open the file with the batch file? I would like to use a command line program to open media files in this manner and allow for the adding more options.

In case that was unclear, here's an example: I have x.bat, a command line media player, and z.mpg. I want to right click z.mpg, choose the "Open With" option, and then select x.bat to open it in. The problem I have is calling z.mpg into x.bat. Is this possible?



Sponsored Link
Ads by Google

Response Number 1
Name: jefro
Date: December 24, 2008 at 10:50:57 Pacific
Reply:

I might have this wrong.

You can apply more than a program name normally. You can add scripts and pipes and inputs such as file names before you end line.

"Best Practices", Event viewer, host file, perfmon, antivirus, anti-spyware, Live CD's, backups, are in my top 10


0

Response Number 2
Name: blazerqb14
Date: December 24, 2008 at 18:04:18 Pacific
Reply:

Thanks for the response. I have no problems adding files manually(is that what you are referring to?), but I would like to avoid having to input the file path for each file as this would offer no time advantage over using the command prompt directly. I would like the batch file to "automatically" enter the file path upon opening the chosen file with the batch file, by using some sort of variable if it is even possible.

Example:

SET /P Opts=Enter Opts
mplayer "Whatever script I need to input a media file into a batch file by opening with" %Opts%
SET Opts=


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows Vista Forum Home


Sponsored links

Ads by Google


Results for: Apply Batch To a File By Open With

Files on folder slow to appear www.computing.net/answers/windows-vista/files-on-folder-slow-to-appear/3518.html

Open With dialog displays a program that is n www.computing.net/answers/windows-vista/open-with-dialog-displays-a-program-that-is-n/5702.html

Open with - Program Not There www.computing.net/answers/windows-vista/open-with-program-not-there/972.html