Jump to content
Sign in to follow this  

Excluding a list of files what is the correct way to seperate them?

Recommended Posts


Hi all

Im working on a backup program and i need to give it files i do want to find and files i dont want it to find.


$_inc_office = "*.xls* *.pdf *.txt *.ppt *.doc*"


$_exc_vista_files="thumbs.db ntuser.dat NTUSER.DAT *.lnk Kalimba.mp3 Maid with the Flaxen Hair.mp3

Now the problem i have is the last one on the excludes >> Maid with the Flaxen Hair.mp3 << because of the spaces it will miss it, now normally in CMD i would do this >> "Maid with the Flaxen Hair.mp3" << so that the spaces dont break the windows spaces problem

so how do i add them in autoit to keep it working

$_exc_vista_files="thumbs.db" "ntuser.dat" "NTUSER.DAT" "*.lnk" "Kalimba.mp3" "Maid with the Flaxen Hair.mp3"

if i do it like this do i need to tell autoit that it is to read them all? or do i add >> & << inbetween each one or whats the simple way?

Sorry if this is a dumb question but ive just returned to coding again after a long layoff


Edited by Chimaera

Share this post

Link to post
Share on other sites

Put single quotes around the filenames with spaces and double quotes around the outside [or perhaps even the other way round].


Share this post

Link to post
Share on other sites

Ok thanks

And what happens if some of the items have single quotes in the names?


"Muita Bobeira.wma" "OAM's Blues.wma"

do i just wildcard the offending character with a * ?


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.