AnsweredAssumed Answered

Copying PDF files seems to corrupt the PDF files

Question asked by Stephanie_Metzger_757 on Feb 11, 2014
Latest reply on Feb 11, 2014 by Jennifer_Jinhong_34

I have 4 PDF files that are created by an SSRS subscription.  When I perform a copy the file some how gets corrupted (starting at 79 kb before copy and 1 kb after).  I am renaming the files - removing the time portion of the file name.  I have a similar process set up to copy CSV files.  That works with no issues.

:SET &Date# = SYS_DATE("MM-DD-YYYY")
:SET &RevDate# = SYS_DATE("YYYY.MM.DD")

!MUST HAVE DOUBLE QUOTES ESCAPED IN FILE/PATH NAME """

:SET &HistoryDestination# = """x:\Data\SSRS Subscriptions\New Accounts Report\History\*.pdf"""
:SET &HistorySource# = """x:\Data\SSRS Subscriptions\New Accounts Report\*.pdf"""
:SET &FileName_CRBT# = """x:\Data\SSRS Subscriptions\New Accounts Report\CRBT_New_Accounts_Report_"
:SET &FileName_CBT# = """x:\Data\SSRS Subscriptions\New Accounts Report\CBT_New_Accounts_Report_"
:SET &FileName_QCBT# = """x:\Data\SSRS Subscriptions\New Accounts Report\QCBT_New_Accounts_Report_"
:SET &FileName_RBT# = """x:\Data\SSRS Subscriptions\New Accounts Report\RBT_New_Accounts_Report_"
:SET &FileName_Pt2# = STR_SUB(&RevDate#, ".", "_")
:SET &TEMP1# = STR_CAT(&FileName_CRBT# ,&FileName_Pt2#)
:SET &TEMP2# = STR_CAT(&FileName_CBT# ,&FileName_Pt2#)
:SET &TEMP3# = STR_CAT(&FileName_QCBT# ,&FileName_Pt2#)
:SET &TEMP4# = STR_CAT(&FileName_RBT# ,&FileName_Pt2#)
:SET &ExtSource# = "*.pdf"""
:SET &ExtDestination# = ".pdf"""
:SET &FileName_Final_CRBT# = STR_CAT(&TEMP1#, &ExtSource#)
:SET &FileName_Final_CBT# = STR_CAT(&TEMP2#, &ExtSource#)
:SET &FileName_Final_QCBT# = STR_CAT(&TEMP3#, &ExtSource#)
:SET &FileName_Final_RBT# = STR_CAT(&TEMP4#, &ExtSource#)

:SET &FileName_NEW_CRBT# = STR_CAT(&TEMP1#, &ExtDestination#)
:SET &FileName_NEW_CBT# = STR_CAT(&TEMP2#, &ExtDestination#)
:SET &FileName_NEW_QCBT# = STR_CAT(&TEMP3#, &ExtDestination#)
:SET &FileName_NEW_RBT# = STR_CAT(&TEMP4#, &ExtDestination#)

COPY /Y &FileName_Final_CRBT# &FileName_NEW_CRBT#
COPY /Y &FileName_Final_CBT# &FileName_NEW_CBT#
COPY /Y &FileName_Final_QCBT# &FileName_NEW_QCBT#
COPY /Y &FileName_Final_RBT# &FileName_NEW_RBT#

 

Outcomes