[Nottingham] REading filesystem into MySQL query

Michael Erskine msemtd at yahoo.co.uk
Thu Oct 13 10:18:41 BST 2005


On Thursday 13 October 2005 09:43, Moses O'Hara wrote:
> I' ve got a filesystem and simply want to recursively read the file names,
> sizes and locations within that hierarchy and store each result into a
> MySQL database for poking at later.

1. establish an appropriate find(1) on the command line
2. use find2perl(1) to give you a head start building a simple script
3. flesh out script: use DBI(3), get a db handle, with each file found do the 
appropriate INSERT

> This is probably really simple but my SQL knowledge ends at SELECT.

You need INSERT knowledge :)

Regards,
Michael Erskine.

-- 
I'm having a MID-WEEK CRISIS!

	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com



More information about the Nottingham mailing list