Where are the temp files put on the system drive that are created by Crystal Reports?

Hello Experts,

I am looking in various temp folders on the c drive to locate the temp files created by business objects/crystal reports.  I have not found them yet.  Can you tell me the path to the folder they could be in?

Thank you, Chop
ChoppAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ChoppAuthor Commented:
My goal is to delete them in order to clear space on the drive.
vastoCommented:
They are created in the temp folder. Search for *.rpt files . They will have also GUID string attached to the file name

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Éric MoreauSenior .Net ConsultantCommented:
If you open a DOS prompt (cmd) and type SET, you will find a variable named TEMP. I find the CR temp files in that folder.
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
The TEMP environment variable (for the user under which the process runs) is indeed correct but, at least with some versions, I believe that if the machine has a 'C:\Temp' folder it is used instead.
Éric MoreauSenior .Net ConsultantCommented:
I have this method in some of my .Net applications that I use to clean up these files:
        Public Shared Sub DeleteCrystalTempFiles()
            Dim strPath As String = IO.Path.GetTempPath

            For Each f As String In IO.Directory.GetFiles(strPath, "*}.rpt")
                Try
                    IO.File.Delete(f)
                    Trace.WriteLine("Crystal Report temp file " + f + " deleted.", Date.Now.ToString)
                Catch ex As Exception
                    Trace.WriteLine("Failed to delete Crystal Report temp file " + f + " (" + ex.ToString + ".", Date.Now.ToString)
                End Try
            Next
            For Each f As String In IO.Directory.GetFiles(strPath, "~cpe{*}.tmp")
                Try
                    IO.File.Delete(f)
                    Trace.WriteLine("Crystal Report temp file " + f + " deleted.", Date.Now.ToString)
                Catch ex As Exception
                    Trace.WriteLine("Failed to delete Crystal Report temp file " + f + " (" + ex.ToString + ".", Date.Now.ToString)
                End Try
            Next
        End Sub

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.