Page 1 of 1

Apply a process to multiple files

Posted: 15 Jul 2010 00:03
by gibdemaffenzucker
Hi guys,

I need your help really urgently: I want to edit multiple files using the little programm AtomicParsley (http://atomicparsley.sourceforge.net/).

The term I want to apply to my files is

Code: Select all

atomicparsley PATHTOFILE --manualAtomRemove "moov.udta.meta.ilst.apID"


What I thought about is pointing the bat to a folder which contains my files and all of which should be applied that line of code above.

Can you please help me?

Re: Apply a process to multiple files

Posted: 15 Jul 2010 05:31
by aGerman
I will not download this tool for tests because I dont need it.
You could run it in a FOR loop.
Untested:

Code: Select all

pushd "c:\your folder"
for %%a in (*.ext) do %~dp0atomicparsley "%%~fa" --manualAtomRemove "moov.udta.meta.ilst.apID"
popd

You have to change c:\your folder and *.ext.

Regards
aGerman

Re: Apply a process to multiple files

Posted: 15 Jul 2010 08:39
by gibdemaffenzucker
great! thanks! works like a charm :mrgreen:

would it be possible to choose the path each time the batch is being run? (instead of having to change it in the source)

Re: Apply a process to multiple files

Posted: 15 Jul 2010 11:13
by aGerman
Of course. What about SET /P?

Code: Select all

@echo off &setlocal
set /p "folder=Enter your path: "
pushd "%folder%" ||goto :eof
for %%a in (*.ext) do "%~dp0atomicparsley.exe" "%%~fa" --manualAtomRemove "moov.udta.meta.ilst.apID"
popd

Note that you have to input the path without quotes (regardless if there are spaces or not).

Regards
aGerman

Re: Apply a process to multiple files

Posted: 15 Jul 2010 23:26
by gibdemaffenzucker
perfectly! thank you very very much - this saves me days of work compared to editing all these files by hand.