Reply to Re: Select random files out of a directory

Your name:

Reply:


Posted by Martin Mandl - m2m tech support on 01/05/07 07:26

If you have access to system commands you could try the following:

1) Get the number of files using something like: ls | wc
2) Use your random generator
3) Now pick your line e.g. for file # 123: ls | head -123 | tail -1

Have fun


howa wrote:
> for example, there are 10K files in the directory,
>
> given that i don't know if files name, is it possible to fetch a file
> randomly?
>
> thanks.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация