473,394 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Access how to create a bulk backup with an "Exception"

anoble1
245 128KB
I have a small db that backs up some file folders on a shared drive that contains a lot of data. I am currently using the XCOPY command to do so which works great. However, there are log files all over that take forever to go through, plus I really don't care to capture them. Is there a way to make an exception for xcopy to copy what it normally does, but NOT to copy anything with a (*.log) extension?

I'm doing something like this:

Expand|Select|Wrap|Line Numbers
  1. Shell "xcopy " & """" & "\\Test.com\Test1\Test2\Test3\Test4\Apps" & """" & " " & """" & fileName & "Test4\Apps\" & """" & " /y /i /e /d"
May 15 '14 #1
3 1179
zmbd
5,501 Expert Mod 4TB
Here's a link to the XCOPY Syntax

Personally, I would build a script that cleared all of the archive flags from anything with a dot-LOG and the use the "/a" option

however, you can build an exclude text file...
/exclude:filename1[+[filename2]][+[filename3]] : Specifies a list of files containing strings.

>UPDATE>
Pulled my old DOS3.0 book out
A better description would be this:
/Exclude:{path}list_of_exclusions.txt

DO NOT USE SPACES NOR ANYTHING OTHER THAN THE ALPHANUMERIC and UNDERSCORE IN THE PATH AND FILE NAME!
This is OLD SCHOOL 8.3 type naming convention (even if you can use a longer name keep it simple and you'll be happier!).


now at the full path you have crete the text file that has just
.log
.LOG

in the file and save.

Now I remember why my batch files would go thru and set/clear the archive flags for files... easier.
May 15 '14 #2
pod
298 100+
I do not know much about XCOPY but I know that you could Google for some VB code to go through your file system, filtering out any file extension you desire; and from there you could run your XCOPY command through the Shell
May 15 '14 #3
anoble1
245 128KB
Nice.
I can't figure out the syntax. I know I am missing something here, or don't have something in the correct spot

Here is what I have.. Does not work
Expand|Select|Wrap|Line Numbers
  1. Shell "xcopy " & """" & "\\Test.com\Test1\Test2\Test3\Test4\SH /EXCLUDE:C:\list-of-excluded-files.txt" & """" & " " & """" & fileName & "SHKB\" & """" & " /y /i /e /d"
Not working... Now it won't even copy the directory. I included in the txt file this:
Expand|Select|Wrap|Line Numbers
  1. ".log"
May 15 '14 #4

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

Similar topics

0
by: Lou Arnold | last post by:
I can't create a database in MSDE with MS Access. Why? Some details: 1) Single computer - so there is no domain controller. 2) No firewalls. A fresh install of Win2K SP4, MSDE 2000A and MS...
3
by: musicloverlch | last post by:
Can MS Access be used to create folders on a drive? I need to create about 700 folders. Thanks, Laura
0
by: ghadley_00 | last post by:
MS Access Create form / report with multiple pages using different background images Hi, Would like to have users fill out a multipage form, and then click a print button, which pulls up the...
9
by: khan | last post by:
can any one help me how to create an automatic backup of ms access database. Actually I want it to be done either by just clicking on a button or automatally make a backup at 6pm every day. plz help
1
by: PJHORNSA | last post by:
Hi all, I want to create a backup of a database using SQLDMO in C#. But I keep on getting a exception. If anyone can help me by providing code for this, it would be appreciated. Thanks in...
1
by: itm | last post by:
I have merged the data from Access. Now I need Word to start a new page every time the sequence number changes. How is this accomplished? Also, is it possible to tell Word to hide duplicates? ...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
6
by: perryche | last post by:
What might cause MS Access to create a copy of the database by itself? I have a Front End and a BE on a databse, but, some users, when click on the short cut, another FE database is created with...
6
by: sinclose | last post by:
I'm doing an important VB project linked with access. I want to give an option on my VB menu that will allow the user to perform a backup of the whole database, but I don't know the codes to create...
9
by: javedsai | last post by:
Hi, I need to build a functionality which can take backup of my database periodically, i.e. admin must able to set the timer in how many days he wants to run database backup. For example, If admin...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.