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
 General SQL Server Forums
 New to SQL Server Programming
 Read folder from another server

Author  Topic 

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2011-07-18 : 11:03:12
Hi,

I have a database (called- GCPM) in SQL server 2005 on Server A. Now, in another Server B, I have a folder called "Monthlyupdates" - i.e., C:\Monthlyupdates. In this folder I have csv files downloaded on a daily basis..

My task is to check if there are any new file(s) downloaded in C:\Monthlyupdates on Server B, if so, then update a table in the database, GCPM in Server A.
Each file will have a naming convention (IXXXYYYYMMDDmmss) where I(default value), XXX - Practice Number, MM - Month, DD - Day, mm - minutes, ss - seconds;
for example;
1) I2002011071816:04:03
2) I2652011071816:05:32

The table update is quite straightforward - setting the flag for file download to "Received" where the practice number is the same as read from the file in Server B.
For example; if I have I2002011071816:04:03, this means its Practice Number = 200.. Therefore, I update table in GCPM with the status to "Received"..

Please can anyone suggest to me how I can approach this problem..

Many thanks
   

- Advertisement -