SSIS is copying files from/to network path (share) while running from business studio (BI) but failing when executed from SQL Server as job (Error Code : 0xC020200E)

Most likely you have a SSIS package to copy file (data) to or from a network location (which is a mapped drive at your server) and the package works perfectly when you run it from business development studio. But problem starts when you run it as a SQL Server job and it fails throwing errors like below:

Executed as user: [ ]. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.1600.1 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  [ ]  Error: [ ]  Code: 0xC020200E     Source: Data Flow Component Flat File Source [33]     Description: Cannot open the datafile "[  ]".  End Error  Error: [ ]     Code: 0xC004701A     Source: Data Flow Component SSIS.Pipeline     Description: component "Flat File Source" (33) failed the pre-execute phase and returned error code 0xC020200E.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  [ ]  Finished: [ ]  Elapsed:  [ ].  The package execution failed.  The step failed.

Solution to this file is actually using UNC path of the network file instead of mapped drive name is flat file connection manager.

For example, if your network file is at \\Servername\Path\File.txt and mapped as Z$ on your server, then in Flat file connection manager, use \\Servername\Path\File.txt instead of          z:\File.txt to resolve this problem.