When I create a zip file using SharpZipLib I end up with .tmp files litering my hard drive. It occurs when I add files to an archive.
I'm not too concerned that it's happening, but I'd like to be able to get the file name so that I can remove the files once the archive is completed. How do I get the name of the .tmp file?
Are you closing the zip file you are creating? I use SharpZipLib for several apps and the .tmp file is always cleaned up automatically by the process once the newly generated zip file is closed and released by the process in every one of my apps.
I'm switching to a different library.
Related
I am writing a program using WinForms in C# which monitors my drive file stream files, and copies the files to a local directory, where the files can then be run locally off of the computer.
My issue I am having is that when I alter or replace the files in the drive file stream either through the desktop app or the browser, it will rename some files to add an additional (1) at the end of the name. This then messes with the files when I need to run them from the local directory on my computer, as it cannot locate these specific files anymore.
Does anyone have a solution for this? Thanks.
I have a legacy system that was developed years ago which receives and processes xml files. After processing the file the filename is changed from .xml to ."done" including the quotation marks. I need to write a batch file that will archive these ."done" files on a regular basis but don't seem to be able to get it to work using;
7z a archivename.zip *."done"
which creates the archive file but it is empty. I've tried specifying the files to archive with a few different variations without success.
I currently have a Mule application that listens for a file in an Input folder, and when detected, reads that file into a database and moves it to an Archive folder. I'd like to know if it's possible to move it to a temporary folder whilst it is being processed and then moved to Archive if read successfully, or to an Error folder if any issues are encountered. The ideal 'journey' of the file would be:
Input Folder
Temp Processing Folder
Archive Folder (success) OR Error Folder (issue found)
I'm currently only able to read the file from Input and move it to Archive using the moveToDirectory attribute in my endpoint. Any advice would be appreciated, thanks in advance.
Configure a the work directory on the connector.
From the documentation:
workDirectory The directory path where the file
should be moved to prior to processing. The work directory must reside
on the same file system as the read directory.
Im trying to close a file (not an application) ussing batch. I namely need particular files and folders closed to execute a delete option. i have noted that open files and folders will not delete.
If you are on a Windows environment, there are a lot of utilities to do that. See for example http://www.thefreecountry.com/utilities/deletelockedfiles.shtml
Is there any built in way to read a file with SSIS and after reading it clearing the file of all content?
Use a File System Task in the Control Flow to either delete or move the file. If you want an empty file, then you can recreate the file with another File System Task after you have deleted it.
My team generally relies on moving files to archive folders after we process a file. The archive folder is compressed whereas the working folder is uncompressed. We setup a process with our Data Center IT to archive the files in the folders to tape on a regular schedule. This gives us full freedom to retrieve any raw files we have processed while getting them off the SAN without requiring department resources.
What we do is create a template file (that just has headers) and then copy it to a file of the name we want to use for processing.