execute a command on selected files

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Looks like you need to take the slashes out, add .exe, and if the quotes are moved slightly (and use ~) -- the output is much cleaner.
Parameters: "%F" "%P" "%T"

Code: Select all

@echo off 
if -%3==- echo First parameter must be filelist path, second and third - source and target path. && pause && goto :EOF 
for /F "usebackq delims=" %%f in ("%~1") do ( 
	"c:\program files\epstool\bin\epstool.exe"  --copy --bbox "%~2%%f" "%~3%%f" 
)
pause 
cls
russurquhart1
Junior Member
Junior Member
Posts: 8
Joined: 2010-06-23, 19:22 UTC

Post by *russurquhart1 »

In answer to your questions.

1. Yes, i am executing the command on files in the /bin directory.
2. I too thought it was strange, that the '/' wasn't getting put there. Seems like it should.
3. When i copied and pasted this command and tried to execute it, i got the exact same error as i reported previously. Does this mean epstool or the command processor doesn't know how to handle concated strings?

Thanks so much for your help!


Russ
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Yes, it seems like epstool can't handle concatenated quoted strings. So you should use Balderstrom batch - it will add only outer quotes to filenames.
russurquhart1
Junior Member
Junior Member
Posts: 8
Joined: 2010-06-23, 19:22 UTC

Post by *russurquhart1 »

That did it!! THANK YOU, THANK YOU!!!!

Scripting has changed a lot since i played with it!

I'll be looking at this to see how everything worked!


Thank you to everyone!!!!!


Russ
Post Reply