Sign in to follow this  
Followers 0
Chimaera

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

4 posts in this topic

#1 ·  Posted (edited)

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.

Includes

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

Excludes

$_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

Chimaera

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].

William

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?

e.g.

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

do i just wildcard the offending character with a * ?

Thanks

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  
Followers 0