Author Topic: Changing or adding pics in place of flickr pics  (Read 7306 times)

MediaMonkey

  • Veteran
  • ***
  • Posts: 61
    • View Profile
Re: Changing or adding pics in place of flickr pics
« Reply #30 on: October 13, 2007, 12:09:16 am »
How do I create a file which lists names of all the images in folder, recursively? Basically what is the Linux eqvt of the following DOS command

dir /b /s c:\MyPics\*.jpg > filelist.txt?

TIA
Core/Hybrid: Foxconn N570SM2AA-8EKRS2H (has 2 network ports), ASUS EN6200LE, AMD-X2 4000+, 1GB DDR2-800, 500 GB SATA/300, DVD drive/writer, Sony XL1B3, BTC 9019URF, Gyro Mouse, Gyro Remote, USB-UIRT, MS Win XP Remote, ATI HDTV Wonder, HDHomeRun

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Changing or adding pics in place of flickr pics
« Reply #31 on: October 13, 2007, 02:23:16 am »
An equivalent might be...

find /MyPics -name "*.jpg" > filelist.txt

the find command is very powerful and it also allows you to apply a command to all matches.
You might have to look at the man page to refine how it displays

HTH
Darren

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Re: Changing or adding pics in place of flickr pics
« Reply #32 on: October 13, 2007, 08:30:17 pm »
Yes I looked at your changes. Nice work.

I am writing a new script that uses inotifywait to watch the directory for files that are moved into it or are deleted. In fact its the same call that the UpdateMedia binary uses to watch for media files that are added to the lmce directory structure.

Sounds like a good idea. The changes I made are a real bunch of hacks as I didn't know how to program perl so I'm sue there's lots of other areas for improvement. For example it just picks random photos from the folder so you could get duplicates.

Chris