Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Copy doc, rename (prefixt) it with identity value and insert it into sql tables

$
0
0

I am trying to copy documents from one network drive to another. The challenges I have are:

  1. While the documents are being copied to the destination folder, renaming/prefixing the documents at the destination folder with an identity value is becoming very complex for me. There are multiple existing documents at the destination folder and I am trying to avoid copying the docs first and renaming them later.  
  2. Each folder names must be parsed and inserted into two SQL Server tables and the folder names are underscore-delimited:My city is Suitland_My state is MD_This is the city I was born_Baltimore is not the city in which I was married_DOB 06-15-1999_I am done here\fileName.pdf. I have the script that parses the underscore-delimited. Howerver, creating a variable to add the idntity value to the copied document name and to insert the same identity to a SQL table is becoming a problem for me.  

I have managed to copy the files but inserting the identity value to sql server and prefixing the identity value to the doc name is becoming a nightmare. Her is an image of what I am trying to do:

Any suggestion or help is really appreciated.

Thank you in advance,

~In-


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>