Start New Discussion within our Software Development Community


I would like to seek help from all experts in VB.NET (VB Language) regarding copying file from source folder to destination folder.

I have a files named YYYYMMDDHHMMSS.txt. Now i want to build a small project to copy those file to destination folder. The project should work in following manner:

  1. Check Computer Date
  2. Look for the file in destination folder similar to computer date and then copy that file to destination folder. For example:
    Let say Computer Date is 26/12/2012. When the program starts, it should check the computer date and then look for the file named 20121226*.txt. If the file is present then it should start copying else it should give a message saying the file does not exists.
  3. It should create log file storing the copy information.

Can any one help me how to have above feature in my project.


Till now how far you wrote code for this? You want someone to write code for you?

That is not a question, that is a specification. As stated above, show what you have tried and described what is giving you problems.

For the date use the Date.Today() function.

To take the date from the format dd/mm/yyyy and put it in the form ddmmyyyy you will need to build a new string like this Date.Today.Day & Date.Today.Month & Date.Today.Year

To check if a file exists you need to use the System.IO.File.Exists(path) function

Hope this helps. Should be enough to complete your task
