Syntax error(missing operator)

Moderators: Jason Susnjara, Larry Epplin, Clint Buechlein, Scott G Vaal

Post Reply
Patrick Russell
Junior Member
Posts: 45
Joined: Fri, May 18 2007, 9:40AM

Syntax error(missing operator)

Post by Patrick Russell »

How do you delete a file name with apostrophe in it. I renamed the file but can't delete the old name?
Paul Ellis
Senior Member
Posts: 193
Joined: Tue, Jan 17 2006, 1:27AM
Location: Pretoria, South Africa

Post by Paul Ellis »

Patrick,

You have to open up a DOS command line (I assume you are using XP?)

Click on start, then run. Type 'cmd' (without the quotes) and enter. This should open a command line window. Now you have to \"change directory\" to where the file is located.

Let's assume it is on the C: drive.
Type c: and enter.
Let's say it is located in c:\\program files\\thermwoord\\ecabinet systems\\jobs
Type in cd\\\"program files\\thermwoord\\ecabinet systems\\jobs\" and enter
NB: LOOK AT THE DOUBLE QUOTES. IT IS ESSENTIAL TO INCLUDE THE DIRECTORY PATH BETWEEN THEM. Any directory or filename that has special characters as part of the name must be included in double quotes to be able to address the name correctly. (Special characters are any character that is not \"a through z\")

Now that you are in the directory where the file is, you may delete it with:
del \"file name with apostrophy\"
Once again you include the filename between double quotes.

Or you could delete the file name with
del beginningOfFileName*
With this, you must make sure that there are not other files that start with the same name, otherwise you are going to delete them as well.
HTH
PS. If you are not sure then pm me and we'll walk through this.
Paul Ellis

"If it works, don't fix it"
DanEpps
Wizard Member
Posts: 5852
Joined: Thu, Jul 28 2005, 10:18AM
Company Name: Dan Epps
Country: UNITED STATES
Location: Rocky Face GA

Post by DanEpps »

You should also be able to delete it via Windows Explorer. Just browse to the directory where the file is located, single-click it and press the \"Del\" key.
Paul Ellis
Senior Member
Posts: 193
Joined: Tue, Jan 17 2006, 1:27AM
Location: Pretoria, South Africa

Post by Paul Ellis »

...or you could follow the easy way and do as Dan says... :oops:


Dan,
I assumed (and you know why one should NEVER \"ass u me\"!) that it is still not working in explorer. Once upon a time it did not, so I never even explored (pun intended) that option.
:oops:
Paul Ellis

"If it works, don't fix it"
DanEpps
Wizard Member
Posts: 5852
Joined: Thu, Jul 28 2005, 10:18AM
Company Name: Dan Epps
Country: UNITED STATES
Location: Rocky Face GA

Post by DanEpps »

Well Paul, I made the opposite assumption that it would just naturally work. I know that is a dangerous thing to do with Windows. :wink:

You made me second guess and I tested it with a file named \"file's.txt\" and it deleted without problem. :D
Paul Ellis
Senior Member
Posts: 193
Joined: Tue, Jan 17 2006, 1:27AM
Location: Pretoria, South Africa

Post by Paul Ellis »

Ok folks! There you have it...
You could be like Little red riding hood and take the long way...
OR
You could be like the Big bad wolf and take the short (easy) way.

You decide which is which

:arrow: :arrow: :arrow: :lol:
Paul Ellis

"If it works, don't fix it"
Michael Yeargain
eCabinets Beta Tester
Posts: 1740
Joined: Tue, May 17 2005, 8:33PM
Company Name: Timeless Cabinetry and Mantles
Location: South East

Post by Michael Yeargain »

Patrick,

Did you re name the file using an apostrophy? It seems weird that you can't delete this file. Is it a hidden or a read only file?
Intel Core i7-5820K (6-Cores, 3.3GHz, 15MB Cache)
32Gigs DDR4
NVIDIA GeForce GTX 960 4GB
SSD 840 256Gig, 2TB, 3TB, Samsung (2TB)
Corsair RM650
Post Reply