Pass selected files or folders as parameter to a program

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

And it looks like you forget about DOS-based OS limitation it max 256 charecters in command line - rather short playlist should be, I have to admit.
OK one more try: There is no 256 chars limit when starting Foobar 2000 (use /C:65000 in Lst2Str for example).
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 17-01-2004 17:08:13 +0000 Lefteous wrote:

L> OK one more try: There is no 256 chars limit when starting
L> Foobar 2000


Under win9x too, comrad? :)[/face]
Nils
Junior Member
Junior Member
Posts: 4
Joined: 2003-05-11, 10:11 UTC
Location: Arlington, TX

Post by *Nils »

The program I'm working with is foobar2000, an audio player. It can accept the follow commandline input:

foobar2000.exe /play "1.mp3" "2.mp3" (files)
foobar2000.exe /play "C:\folder1" "C:\folder2" (folders, so foobar2000 will play all the audio files under the folder)
The input parameters of foobar2000 look similar to those defined for Media Player Classic (the player that I'm currently using). MPC looks at the file extension(s) of the input argument(s) to determine how to open the file(s) specified, so naturally it croaks when you try to launch a file with a .tmp extension. There isn't any way to force the application to ingore the extension and just assume that it's a playlist file; I'm going to assume that foobar2000 has a similar limitation (please correct me if this is not the case).

I made a playlist generator/launcher start menu entry for MPC that gets around this annoyance and does the same thing that you're asking for -- maybe it'll work for foobar2000 as well (It's worth a shot, at least). The syntax of the menu item is:

Code: Select all

Title:         (whatever you want)
Command:       cmd /c copy /y
Parameters:    "%L" "%TEMP%\~tmp.m3u" & start mplayerc.exe "%TEMP%\~tmp.m3u"
Start path:    c:\Program Files\Media Player Classic\
The %L parameter will dump anything selected into the temp file (in the active pane only, however), so this command will work with directories selected, individual files selected, or a mixture of the two. The temp file generated by totalcmd is deleted as soon as the cmd.exe process terminates, which is almost immediately. The only drawback is that the re-named copy of the playlist is left orphaned in the \temp directory and not automatically deleted (not a big deal to me).
User avatar
Guillaume
Member
Member
Posts: 109
Joined: 2003-04-08, 16:51 UTC

Post by *Guillaume »

Sorry to kick such an old topic, but it's better than creating a new one for exactly the same problem. I created something similar to what described in Nils' post above, but experienced the following problem:

When copying the list file (%L) it creates a file called EMPplaylist.m3u in the target directory (%T). It doesn't matter whether I use %temp% or %TEMP% for parameter, it just creates emplaylist.m3u or EMPplaylist.m3u (caps/no caps).

Furthermore, wouldn't it just be nice if we could specify the extension for the list file, like "%L.m3u"? Would make %L a lot more versatile.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Please don't ask in old threads if the question is not directly related to the first posting in the thread.

You should do the work of completely explaining your problem in one posting including all details. What program are you using? What does your command look like? No info about that. I don't have desires to search in questions from other people to understand yours.

It's nice that you try to not pollute the forum but it's of no real use here. This thread is 1.5 years old, let it rest in piece, thanks. ;)

Icfu
This account is for sale
Post Reply