Returns the complete path for the latest snapshot generated for a publication. This stored procedure is executed at the Publisher on the publication database.
sp_browsesnapshotfolder is used in snapshot replication and transactional replication.
If the subscriber and subscriber_db fields are left NULL, the stored procedure returns the snapshot folder of the most recent snapshot it can find for the publication. If the subscriber and subscriber_db fields are specified, the stored procedure returns the snapshot folder for the specified subscription. If a snapshot has not been generated for the publication, an empty result set is returned.
If the publication is set up to generate snapshot files in both the Publisher working directory and Publisher snapshot folder, the result set contains two rows. The first row contains the publication snapshot folder and the second row contains the publisher working directory. sp_browsesnapshotfolder is useful for determining the directory where snapshot files are generated.