Searching and Copying Files - file

The main objective is to Search the System for files and then copy them without using File Transfer Protocol (FTP)
Need help building a program that searches the System [Windows] for all files with .docx, .doc & .pdf files and then copies them to another directory.
One of my colleagues sent me this code:
scan a directory to find files in c
This code searches for the files, how to I copy them to a specific directory?
Best regards,
CarlosG

Related

Drive File Stream altering my file names to add (1) at the end of their names

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.

7Zip command line - Help archiving files with abnormal extension

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.

What is the difference between a directory and a file with no extension?

On nearly all types of computers (if not all), folders have no extension. So I was wondering, what is the difference between a directory and a file with no extension? Don't they have the same name?
You cannot have a directory and a file of the same name (regardless of extension), just like you cannot have two files of the same name.
A directory is just a file, too.
The difference is that a directory can contain other files. It does not matter how it is called, it can have an extension (or two). What makes it a directory is that it was created as such.
Directory:
Directory is a collection of files and folders.
difference between directory and File : A file is any kind of computer document and a directory is a computer document folder or filing cabinet.
directory is a collection of a the folders and files.
in the linux based system directories will be in blue colour and has the permissions stsrting with like --rwx-r--rwx and directories permisions start from the drwx--rwx for the owner and group and nothing guys do not need to recognize the directories and file.

How do I clean up the temp files created by SharpZipLib

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.

Clearing a file after reading with SSIS

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.

Resources