Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Archival System for Images

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-01 : 23:12:17
Khalil Virji writes "Hello,

I am a SQL Programmer and need to build an archival system for Images. Our hardrive has run out of space and we need to move the images from one server to another on different machines. I was thinking on the lines of using xp_cmdshell Move. Could you tell me if there is a better way to do this or if this is the best way then how should I implement this command.

Thanks,

KV"

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-01-01 : 23:27:39
Hi

I often have to do stuff like this to import CDs of images into a similar system. To do this, I use vbscript.
I write a WSH file that pulls the paths from the database and uses filesystem object to copy the files around. I can trap errors and write them to a log file too which is very handy.

I'm not going to post any code, because it's at work and I'm at home but you can get info on vbscript at http://msdn.microsoft.com/scripting

good luck

Damian
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2002-01-02 : 09:39:43
I do this sort of thing using xp_cmdshell and move quite often as it gets round the problem of permissions - sql server service will have permission on the directories or the system doesn't work.

==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -