IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New That someone sucks
In the time that Barry and I have spent on this problem already, either of us could have written that script.

Besides his variable names suck.

What you need to do is get a list of old files (in one query), then loop over the set of files. For each file decide the new name, move the file, then update the database. You'll need to know how to figure out the new name (business knowledge, you probably have it), how to move a file (Perl's system command may help you here), and how to issue an update (my $sth = $dbh->prepare("update FOO set x = ? where y = ?") or die "Cannot prepare: $!"; then later $sth->execute("new filename", $file_id);)

If the application was sanely built there is some locking needed before you move the file out from under the application. Odds are that you aren't so lucky, so I'd suggest running your script when the application is not in use.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New ICLRPD (new thread)
Created as new thread #242594 titled [link|/forums/render/content/show?contentid=242594|ICLRPD]
--
Steve
[link|http://www.ubuntulinux.org|Ubuntu]
New the application has a utility to do the actual move
I just need to generate a list of what needs to be moved and who owns it. Thanks to both you and Barry for your help but the variable names here were changed by me to protect the innocent :-)
thanx,
bill
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 50 years. meep
     perl DBI question - (boxley) - (11)
         I don't understand your question - (ben_tilly) - (4)
             Thank you sir - (boxley) - (3)
                 Those 2 are identical. - (broomberg) - (2)
                     why does the one without parense print and not the other? - (boxley) - (1)
                         Barry is right - (ben_tilly)
         found why no data shows up - (boxley) - (5)
             What EXACTLY (in clear concise terms) are you trying to do. - (broomberg) - (4)
                 well hmm - (boxley) - (3)
                     That someone sucks - (ben_tilly) - (2)
                         ICLRPD (new thread) - (Steve Lowe)
                         the application has a utility to do the actual move - (boxley)

That sounds like a venereal disease.
92 ms