Change location of auto-enable mpg files

kewal

New Member
I have been using auto-enable mpg to create copies of recordings so I can watch them on my tablet.

Everything works really well but my process would be much quicker if the mpg files could be located in an MPG folder rather than as copies in the source folder.

I don't understand how complex this is but wondered if there is any possibility of having an option for auto-enable mpg to place the newly created mpg files into a nominated folder?

If not, is there a pretty simple script solution I could run to move all .mpg files to a specified folder?

Thanks a lot

Kewa
 

Ezra Pound

Well-Known Member
To move all mpg files from /media/My Video/Original Place to /media/My Video/My-MPG
Code:
  mv /media/My\ Video/Original\ Place/*.mpg /media/My\ Video/My-MPG/
Note :- the backslash space is required if there is a space, e.g. in between 'My' and 'Video' or 'Original' and 'Place'
 

Black Hole

May contain traces of nut
Rather than escape the spaces you could enclose the strings in quotes or speech marks.

This could be a job for sweeper, possibly?
 

Black Hole

May contain traces of nut
Maybe you could supply a working example using quotes
Don't quotes work then? I usually use speech marks on my command lines, unless you are saying the mv command doesn't accept them (but I don't know why it wouldn't, this is a shell function). How about a less cryptic exposition?

BTW, the wild card has to be left outside the quoted part otherwise it won't be interpreted.
 
OP
K

kewal

New Member
Many thanks for the replies. If I understand the proposed solution correctly (big if!) I would need to run this for each folder in My Videos which is sort of what I'm doing manually using copy or cut and paste in Webif and pasting mpgs into a separate folder.

What I'm trying to achieve is either the mpg files somehow get created in the My-mpg directory rather than the source directory (I guess this is unlikely to be achievable) or the script automatically runs through the My Videos folder including all subdirectories except My-mpg and moves any mpg files to My-mpg presumably using Cron to run say every hour.

I hope this makes sense - I know what I'm trying to achieve but trying to articulate it or solve it is more of a struggle. Being able to create mpgs and copy them to pc/laptop/tablet is a really great facility so hopefully this will be useful to others not just me.

Thanks again

Kewa
 

Black Hole

May contain traces of nut
We have several existing CF packages which crawl the file system looking for specific things and relocating them - flatten, series-filer, and sweeper come to mind. If af123 sees there is a demand, I'm sure this could be added as an optional command in sweeper (as I hinted above).

Meanwhile, supposing you set up a specific folder for auto-mpg and move anything you want converted into it, it would not be difficult to have a boot script which then moves any .mpg files found in it to another folder (so that this happens during start-up) or as a cron job so that it occurs, say, hourly.

A few days patience may result in a more elegant solution.
 
Top