?
Solved

Problem deleting file that contains | and > character.

Posted on 2003-03-05
19
Medium Priority
?
426 Views
Last Modified: 2010-04-13
I am having problem to delete a file that has pipe (|) and redirection (>) character.

For example the file is : "file|>.xxx"

The file started to show up after the server crashed.  and it's found in c:\found.001\ folder.

0
Comment
Question by:samri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 3
  • +4
19 Comments
 
LVL 12

Expert Comment

by:pjknibbs
ID: 8078239
Unfortunately, I don't think you'll be able to delete that file. The | and > characters are reserved in DOS, and shouldn't ever appear as part of a filename--once they do, there isn't anything you can do to get rid of them.
0
 
LVL 15

Author Comment

by:samri
ID: 8078396
my friend is having this problem (in the first place).

well, that was my initial assumption... However, if the file could appear, then there should be a way to make it dissapear. (right). And for real, it does appear.  This is causing backup to fail (for some obvious reason) since the program can't read the file).

I remember having the same (closely) problem in my multiboot machine.  the trick that I did is by booting to linux, mount the Fs, and delete it from there.   it worked.

However, this is a remote win2k server, running lotus notes.  Do you think if I do a remote smbfs mount from linux -- does this work (ask first, try later :).

I would still opt for making this file dissapear.

one more thing - I could move the folder around in the same fs (C Drive) but cannot mv it to another fs (D drive for example).

A few other option would be doing CHKDSK /F (and reboot), or exclude the directory from backup.  Or last one would be formatting C, and rebuild from good backup-set (very last thing to do :(

please help.
0
 

Expert Comment

by:Fallenswordsman
ID: 8079500
What I would suggest is try using a file shredder. We had the same problem once before with one of our servers - couldn't remove a file of a weird filename, but I can't remember what program we used - maybe try:

http://12ghosts.com/ghosts/shredder.htm
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 7

Expert Comment

by:YarnoSG
ID: 8080089
You COULD use diskprobe to bypass the OS and rename the file at the lowest level;  but that would not be for the faint ofheart.

I would reccomend running the CHKDSK that samri reccomended first, then trying the Diskprobe (resource kit tool) to edit the file name table;  do a character for character substitition; do not change the length of the name.  Then use standard tools to delete the file and run yet ANOTHER CHKDSK.  I would also check your event log for DISK errors;  files like that happen for a reason, and it would be to your benefit to find out that reason BEFORE your hard drive(s) die.

HTH

-Steven Yarnot
http://yarnosg.home.insightbb.com
0
 
LVL 15

Author Comment

by:samri
ID: 8086522
thanks a lot.

I would try this out and let you know.

please give me some time.

cheers.
0
 
LVL 7

Expert Comment

by:YarnoSG
ID: 8088191
Just found this:

http://www.jsifaq.com/suba/tip0100/rh0167.htm


Maybe it will help

-Steven Yarnot
http://yarnosg.home.insightbb.com
0
 
LVL 7

Expert Comment

by:YarnoSG
ID: 8088207
also, to send the special symbols to the command line and not have them be interpreted as special, precede them with "^"  i.e.   to send  "T|his" to the command line, you would have to type "T^|his".....


HTH

-Steve
0
 
LVL 15

Author Comment

by:samri
ID: 8194190
Guys,

I do not have much time to go thru the proposed solution.

Plese be patient.

cheers.
0
 

Expert Comment

by:Fallenswordsman
ID: 8194312
No problemo - The other bit of freeware that you might try failing everything else is something called Eraser - that seems to happily destroy things!

http://www.heidi.ie/eraser/download.asp
0
 
LVL 3

Expert Comment

by:ravenm
ID: 8513638
This problem is easily solved

I have done it many times

rename the file... no error occurs

then delete the file

Chris
0
 
LVL 15

Author Comment

by:samri
ID: 8515215
Chris,

tried that too.  And it does not work.

ps. this question is pending for quite sometime, and the friend who had this is not interested anymore.
0
 
LVL 3

Expert Comment

by:ravenm
ID: 8515358
Ok

but just for interest sake if I recall the file has to be renamed in the shell so from windows explorer etc...

to do it programmatically you will need to rename it using the shell function not the std lib rename function

once renamed using the shell function, then deletion is trivial.

P.S. I havent actually done that programmatically just using explorer
0
 
LVL 15

Author Comment

by:samri
ID: 8526894
hi ravenm,

now the proposed solution sounds more complicated that the actual problem.

>>to do it programmatically you will need to rename it using the shell function not the std lib rename function

how is that?

Initially I tried the rm.exe (unix ported rm cmd), which in most cases, would word where windows del cmd failed.

again, the file stars to appear after the machine crashed -- which i suspect the file is a result of some allocation error on the HD.  In most cases, doing a CHKDSK /F might work, but we will try to try other options first.

0
 
LVL 3

Expert Comment

by:ravenm
ID: 8528735

to access shell functions you need to include <shellapi.h> but they are a steep learning curve and not at all logical, what else can you expect from Microsoft.

whether rm would work or not would depend on which version of windows you are using

on older version possibly, on newer versions I doubt it because the underlying DOS has disappeared and windows controls all

If your friend is regularly having this problem I suggest a new hard drive, it sounds as though the error is on the hard drive causing the crashes.

Sorry it has been a long time since I experianced this and I am not 100% sure of what I did apart from replace my hard drive not long after

0
 
LVL 5

Expert Comment

by:cempasha
ID: 8603797
This question is still open and getting old. If any of the comment(s) above helped you please accept it as an answer or split the points who ever helped you in this question. Your attention in finalising this question is very much appreciated. Thanks in advance,

****** PLEASE DO NOT ACCEPT THIS AS AN ANSWER ********

- If you would like to close this question and have your points refunded, please post a question in community support area on http://www.experts-exchange.com/Community_Support/ giving the address of this question. Thank you      

Pasha

Cleanup Volunteer


0
 
LVL 15

Author Comment

by:samri
ID: 8613401
to be frank!  I never get the chance to test any of the proposed solution.  

I would be more than happy to close the Q (as it gets too old).

I would guess that comment from YarnoSG looks promising.
---
You COULD use diskprobe to bypass the OS and rename the file at the lowest level;  but that would not be for the faint ofheart.

I would reccomend running the CHKDSK that samri reccomended first, then trying the Diskprobe (resource kit tool) to edit the file name table;  do a character for character substitition; do not change the length of the name.  Then use standard tools to delete the file and run yet ANOTHER CHKDSK.  I would also check your event log for DISK errors;  files like that happen for a reason, and it would be to your benefit to find out that reason BEFORE your hard drive(s) die.
---

Unless anybody object.
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 9578831
Question closed and points partially refunded

PashaMod
CS Moderator
0
 
LVL 15

Author Comment

by:samri
ID: 9582332
thanks for the support.

I thought that YarnoSG gots the pts.

>> I would guess that comment from YarnoSG looks promising.
0
 

Expert Comment

by:PashaMod
ID: 9582461
My bad, sorry YarnoSG please visit http://www.experts-exchange.com/Operating_Systems/Win2000/Q_20771818.html to collect your points. samri, thank you for reminding this
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question