1.

Solve : Trademarks and Scripts?

Answer»

I am looking to run a dos script to delete a couple icons that have the trademark symbol (®) in them. When I put the name shown it says it cant find the file. How would I do this? Or I guess is it even possible?What do you mean by the "name shown"?the icon name such as guardian® test.ico is what I am referring to. I have a script that I have it find the file and delete it but I am having ISSUES with the files with that symbol.Quote from: guardian on September 10, 2008, 11:11:12 AM

guardian® test.ico is what I am referring to.

1. Is that the actual file name?

2. How did it get on your hard drive?




That is not the actual name of the file the actual name is Horizon® Practice Plus 9.5 Prod. The file did get on my system through an application that I do use but I am working on an upgrade but when I upgrade the system it leaves that file behind and I am GOING to be doing this on multiple MACHINES so i am looking to make a script to remove that file so the new one will take its place and an extra shortcut is not left behind.1. I presume there is an .ico extension?

2. Have you tried using wild cards e.g. del Horizon*.ico or del *.ico ?



its a .lnk (shortcut) and i cant use the wild card because there are other icons there that are Horizon first and then stuff after so i will get extra files.So the full name is "Horizon® Practice Plus 9.5 Prod.lnk" ?

I notice it appears to have a space. I hesitate to suggest something so obvious and basic, but have you been putting quote MARKS around the filename?


LOL yeah I am putting the quotes and yes the full name is Horizon® Practice Plus 9.5 Prod.lnkI tried to reproduce your situation. I can both create and delete a file named (by copying from your post) as you describe.

Code: [Select]D:\test>md badname

D:\test>cd badname

D:\test\badname>echo hello > test.txt

D:\test\badname>ren test.txt "Horizon® Practice Plus 9.5 Prod.lnk"

D:\test\badname>dir
Volume in drive D is DATA2
Volume Serial Number is 00CC-DEDF

Directory of D:\test\badname

10/09/2008 19:03 <DIR> ..
10/09/2008 19:03 <DIR> .
10/09/2008 19:03 8 Horizon® Practice Plus 9.5 Prod.lnk
1 File(s) 8 bytes
2 Dir(s) 127,898,386,432 bytes free

D:\test\badname>del "Horizon® Practice Plus 9.5 Prod.lnk"

D:\test\badname>

D:\test\badname>dir
Volume in drive D is DATA2
Volume Serial Number is 00CC-DEDF

Directory of D:\test\badname

10/09/2008 19:03 <DIR> ..
10/09/2008 19:03 <DIR> .
0 File(s) 0 bytes
2 Dir(s) 127,865,421,824 bytes free
We can avoid using the ® symbol because the ? wildcard only matches 1 character in an exact position...

Code: [Select]D:\test\badname>dir
Volume in drive D is DATA2
Volume Serial Number is 00CC-DEDF

Directory of D:\test\badname

10/09/2008 20:50 <DIR> ..
10/09/2008 20:50 <DIR> .
10/09/2008 20:50 8 Horizon® Practice Plus 9.5 Prod.lnk
1 File(s) 8 bytes
2 Dir(s) 126,659,215,360 bytes free

D:\test\badname>del "Horizon? Practice Plus 9.5 Prod.lnk"

D:\test\badname>dir
Volume in drive D is DATA2
Volume Serial Number is 00CC-DEDF

Directory of D:\test\badname

10/09/2008 20:50 <DIR> ..
10/09/2008 20:50 <DIR> .
0 File(s) 0 bytes
2 Dir(s) 126,656,790,528 bytes free

D:\test\badname>did you try it yet?
I have tried it and the question mark (?) did work. Thank you for all of your help.


Discussion

No Comment Found