hi, for the last half hour or so i have been trying to get this line of code to work

system("del %APPDATA%\\Microsoft\\Windows\\Start Menu\\*.vbs");

but i keep getting errors, so far i have tried wrapping start menu using escaped quotes but im yet to get it work .
any help would be appreciated

Recommended Answers

All 2 Replies

I think you need quotes around the whole thing:

system("del \"%APPDATA%\\Microsoft\\Windows\\Start Menu\\*.vbs\"");

That's the way to deal with that (when there are spaces anywhere in the file-path).

Plus doesn't system always require a string as its argument?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.