batch backups/ exclude command

K

KB

Hope this post in on topic :)

I am trying to back up my non-windows browser profile using xcopy in a
batch file. I am successful in backing up my entire profile with the
following line:

xcopy /e /v /y C:\"Documents and Settings"\Owner\"Application
Data"\Mozilla D:\"My Documents"\Backups\Firefox

However, I want to exclude the Cache folder which is located in
C:\Documents and Settings\Owner\Application
Data\Mozilla\Firefox\Profiles\5s75az43.default\Cache.

Can someone tell me how to do this? I tried /exclude:\Cache\ but then it
copies nothing, and I tried the absolute path and nothing. Help with
this would be appreciated :)

Thanks,

KB
 
C

Code-Curious Mom

I think in your case all you would need in NoBackup.txt is the single line:

Cache

If you have trouble, put NoBackup.txt in the root folder as is referenced in
the link I sent.
 
K

KB

Code-Curious Mom said:
I think in your case all you would need in NoBackup.txt is the single line:

Cache

If you have trouble, put NoBackup.txt in the root folder as is referenced in
the link I sent.
Thanks for your help. my xcopy string didn't have the full path to the
Cache folder which caused it not to work. Also, I didn't understand the
/exclude command had to be pointed to a text file. I created one with a
list including Cache, plus a few misc filenames and it worked.

Thanks again!
KB (newbie to batch files);)
 
C

Code-Curious Mom

You're welcome. Glad it works now.

KB said:
Thanks for your help. my xcopy string didn't have the full path to the
Cache folder which caused it not to work. Also, I didn't understand the
/exclude command had to be pointed to a text file. I created one with a
list including Cache, plus a few misc filenames and it worked.

Thanks again!
KB (newbie to batch files);)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top