473,509 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copy Date stamp folder from one location to another

2 New Member
Hi all i am searching this from a long time but didn't find any answer for this, as i am new to programming i m unable to modify codes also.

What i want is to copy datestamp folder from one location to another, everyday we are getting datestamp folder i want to move the whole folder to some other location..
Jun 9 '14 #1
1 1184
twinnyfo
3,653 Recognized Expert Moderator Specialist
Codebuster,

What have you tried so far? There are numerous ways to copy files, but here is some cod eto get you started.

Expand|Select|Wrap|Line Numbers
  1. Public Function CopyFolder(SourceFolder As String, DestinationFolder As String, _
  2.     OverWriteFiles As Boolean) As Boolean
  3. '**********************************************************************************
  4. '* Purpose:  Allows user to Copy a fodler and its files to a new location         *
  5. '* Accepts:  SourceFolder      = Location of the source folder                    *
  6. '*           DestinationFolder = Destination location of where to copy the folder *
  7. '*           OverWriteFiles    = Indicates whether to overwrite existing files    *
  8. '* Returns:  Ture/False; indicates whether or not function was successful         *
  9. '* ********************************************************************************
  10. On Error GoTo EH
  11.     Dim FSO As Object
  12.     CopyFolder = False
  13.     Set FSO = CreateObject("Scripting.FileSystemObject")
  14.     FSO.CopyFolder SourceFolder, DestinationFolder, OverWriteFiles
  15.     CopyFolder = True
  16. EH_Exit:
  17.     On Error Resume Next
  18.     Set FSO = Nothing
  19.     Exit Function
  20. EH:
  21.     If Err.Number = 76 Then
  22.         MsgBox "The Source Folder '" & SourceFolder & "' could not be found.  " & _
  23.             "Please contact your Database Administrator", vbCritical, "Copy Error!"
  24.     Else
  25.         MsgBox "There was an error copying the Folder.  " & _
  26.             "Please contact your Database Administrator", vbOKOnly, "Copy Error!"
  27.     End If
  28.     Resume EH_Exit
  29. End Function
Hope this hepps!
Jun 12 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2428
by: alpha_male | last post by:
Can anybody help to create code which would create new table from linked table and additionally will add date stamp for the name of new table? For example tblHello is linked table and the code...
6
13335
by: ad | last post by:
I want to copy all files under a folder to another folder. If I use File.Copy(sourceFileName, destFileName, overwrite), it must specify all files name in the source and destionation. How can I...
8
4545
by: bessie | last post by:
I have a registration form that loads into a dava.csv file (code below). I want to add a time/date stamp so that each time someone registers, the last column in the spreadsheet shows the time/date....
1
1674
MitchR
by: MitchR | last post by:
I have created a text box and scripted it to receive a line of text and current date upon completion of a scripted event. My question is this. I need to script this text box and date stamp to...
3
1913
by: climber | last post by:
Hello, I am attemping to append a memo box or text box with a time/date stamp. What I would like to happen is either when I click a button the time/date stamp prints below what is already typed...
3
2283
by: climber | last post by:
Hello, I am attemping to append a memo box or text box with a time/date stamp. What I would like to happen is either when I click a button the time/date stamp prints below what is already typed...
2
2333
by: favor08 | last post by:
7/19/2007 12:46:30 am. is in a field called CmplteDte. It is a date stamp of when the user completed the item. I need the time for a report but for a form that the supervisors use to QA the previous...
6
7047
by: Ned1966 | last post by:
I want to automatically date stamp a memo/text box when i click a combo box. i know how to start the code bulider in the event properties of the combo box and get it to select the memo/text box i.e...
4
3011
by: Tang | last post by:
Hi, could anybody help me with this please I want to add a date stamp in a table, it should automaticlly updated when another field in the same table is selected as "Yes". I am not very good at...
2
1772
by: swethak | last post by:
hi, i want to copy the contents of one folder into another folder.For that i create the one new folder . I copied the files of already existing folder into new folder.For that i write a code as...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.