locked
Identify and move the files to different folder using file owner name. RRS feed

  • Question

  • Hi ,

    I have on FTP folder where we received CSV files every day. Now there are few files with some different different owners name.

    For example we have 3 files with owner A and 4 files with Owner B name. Now Before my ETL start i want to check and move owner B files to different folder and want owner A files to be there as it it.

     Using sql server 2012 .

    Please suggest is ti possible ?

    Thanks in advance.

    Saturday, August 15, 2020 8:07 AM

All replies

  • I am sure there is a way to do it via a script. I can't research it right now.

    However, it would be much simpler to simply change the directory for the login of OwnerB in FTP and not let the files go into the directory at all and go where you want them.

    Saturday, August 15, 2020 8:27 PM
  • Hi SR_MCTS,

    May I know if you try to use FTP task in SSIS package?

    If not, please refer to the following links:

      FTP Task

      SSIS FTP Task

    Best Regards,

    Mona


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    Monday, August 17, 2020 7:22 AM
  • Hi Mona,

    Yes i am using FTP tasks. But my requirement are not covered by FTP task.

    Monday, August 17, 2020 1:01 PM
  • Hi SR_MCTS,

    You can try free WinSCP utility for your needs.

    Here is a good link on it: FTP File Properties

    WinSCP FileInfo object exposes reach set of properties, including an owner.

    Please see below.

    Monday, August 17, 2020 2:46 PM