~~helix84,

Ah - thanks. Now I get the whole /dspace/assetstore/14/85/80 thing. It's
location is in the bitstream name, too. As I don't know squat about
postgres (I'm a MySQL guy) in your SQL are you actually running the copy
command, or just spelling it out? I run it and I get 5 lines of the same
thing. What I will probably have is the filename itself, so what I wind up
with is:

SELECT 'cp /dspace/assetstore/' || substr(bitstream.internal_id, 1, 2) ||
'/' || substr(bitstream.internal_id, 3, 2) || '/' ||
substr(bitstream.internal_id, 5, 2) || '/' || bitstream.internal_id || '
/var/www/' || bitstream.name
FROM bitstream,bundle2bitstream
WHERE bitstream.source = '(filename)' LIMIT 1

This gives me something to play with. Now all I have to do is get php to
talk to postgres and I can have some fun.

Thanks very much!

Mark

On Tue, Nov 20, 2012 at 10:43 AM, helix84 <heli...@centrum.sk> wrote:

> If you have bitstream_id (e.g. 123123 in this example), here's how to do
> it :
>
> SELECT 'cp /dspace/assetstore/' || substr(bitstream.internal_id, 1, 2) || '/' 
> || substr(bitstream.internal_id, 3, 2) || '/' || 
> substr(bitstream.internal_id, 5, 2) || '/' || bitstream.internal_id || ' ' || 
> bitstream.nameFROM bitstream,bundle2bitstreamWHERE bitstream.bitstream_id = 
> 123123
>
>
>
> Regards,
> ~~helix84
>
> Compulsory reading: DSpace Mailing List Etiquette
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to