I want to, for example, delete a file in AppData/Roaming/MyFolder/myfile.txt.
I use command prompt and typed this: del %userprofile%/AppData/Roaming/MyFolder/myfile.txt
But then the command prompt said: Parameter format not correct - "ppData"
Then I think again and used %appdata% and typed:del %appdata%/MyFolder/myfile.txt
But the command prompt said: Invalid switch - "MyFolder"
How to delete myfile.txt using %userprofile% or %appdata%?
Is my syntax wrong?
Use
\instead of/as the path separator: