Backup all files and folders *except* recycle and sys vol

Discuss and share scripts and script files...
Post Reply
avsfan
Posts: 554
Joined: 29 Jun 2006 09:00
Location: Fort Collins, Colorado

Backup all files and folders *except* recycle and sys vol

Post by avsfan »

Hi All,

I'm looking to write a script to backup all files and folders from one drive to another, except the Recycle Bin and System Volume Information folders.

It appears the syntax would be:

Code: Select all

backupto [destination], [source], 1,1,,,,,
If that's the case, how do I get it to skip just those two special system folders? I'm guessing there's a simple way to do it, but haven't been able to find it, yet.

Thanks!

andy

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Backup all files and folders *except* recycle and sys vo

Post by highend »

Use e.g.:

Code: Select all

formatlist(listfolder("E:\", , 2), "f", , "!$RECYCLE.BIN|System Volume Information", "f");
For the [source] part of the backupto script command (and adapt the "E:\")
One of my scripts helped you out? Please donate via Paypal

Post Reply