Appendfile and Quotation marks?

Hi All,

Our vulnerability scanner is picking up flash directories in user Appdata and I have been asked to get something together to be rid of them. Using the following from another fixlet in our site, however given it is dealing with user profiles I’m hitting a snag where there is a space in the path.

appendfile {("rd /s /q " & pathname of it & "%0d%0a") of folders "Flash Player" of folders "AppData\Roaming\Macromedia" of folders of folder "C:\Users\"}

This writes the command as;

rd /s /q C:\Users\admf638_a\AppData\Roaming\Macromedia\Flash Player

What I need for it to work is;

rd /s /q "C:\Users\admf638_a\AppData\Roaming\Macromedia\Flash Player"

I’m not quite getting it. Any suggestions?

1 Like

You can encode the double quotes as %22

appendfile {("rd /s /q %22" & pathname of it & "%22%0d%0a") of folders "Flash Player" of folders "AppData\Roaming\Macromedia" of folders of folder "C:\Users\"}

2 Likes

Thanks Brolly, that did the trick here.

1 Like