Question

Problem with deleting folders

Asked by: lwinkenb

I run an ftp, and lately have run into a strange problem.  Someone has uploaded folders that I cannot delete.  These folders have a space at the end of the the name, so I cannot delete, rename, move, or do anything to them.

Anyone know any tricks to get rid of this problem? (without formatting)

Thanks!
-Luke

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2002-05-20 at 22:33:11ID20302910
Tags

delete

,

folder

,

end

Topic

Operating Systems Miscellaneous

Participating Experts
12
Points
0
Comments
23

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. ftp problem
    Hello experts, Recently I opened my ftp server up so someone can upload a file. Some other people decided to upload folder called lpt1, com1, aux. I can't get rid of these folders, because they are reserve names. I tried using an ftp client to rename them and did not work. A...
  2. Redhat 7.3 Wu-FTP Upload permission
    I am using Redhat 7.3 using Wu-FTP server, I want to create a upload account (Upload) which is only for read and upload only. Firstly, I set upload account permission as following drw-----3 upload uploadgroup 4096 Feb 10 20:52 upload -when I use Ms-Dos to login,after I ...
  3. FTP Downloading and Uploading files
    I am currently writing a routine in VFP 7.0 to download files from an FTP site. I found a great routine CaptainCyril’s Download Upgrades like Norton Anti-Virus Live Update link that downloads the HTML into a memo field and it works like a charm. However, I can’t figure out ...
  4. UPLOADING / RENAMING A FILE
    We are having an issue when we upload a file to our website in that it is not renaming the file correctly and is crashing out. The original file is successfully uploading with its original name but is not renaming to the value we want. Is this because the file is not fully up...
  5. Rename and delete files on FTP Server
    hi all i'm using Inet control in my applicaion to upload files to FTP server, using following command Inet1.Execute , "PUT c:\work\page1.htm html/page1.htm" now i want to rename and delete some files already put there before i upload the above file. is there any...
  6. FTP: Upload copy of file, then rename/replace once on …
    Hi, My problem is that when I upload PHP files to our web server the very file is unavailable or generates an error since the new file is incomplete while the upload is taking place. I have some rather large PHP files that are used site-wide and this is very irritating for o...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: WakeupPosted on 2002-05-20 at 22:59:01ID: 7023282

What OS?  are you trying to delete them from a GUI interface or a Dos interface?  or through the FTP?

What happens when you try and delete it?  get any error messages?
My suggestion is if you have a GUI interface, just drag it to the recycle bin....or highlight it and hit Delete.  
Or, you can right mouse click on it and choose delete.
what happens when you try either of these routes?

Give us a little more info so we can help ya out.

 

by: LongbowPosted on 2002-05-21 at 00:21:44ID: 7023382

Try with quotes to delete these files.
Like "filename.ext " ?

 

by: MFKPosted on 2002-05-21 at 05:04:07ID: 7023801

What OS? What error message do u get? What kind of file system do u have for the drive on which these folders are created? Check the security properties of these folders. If it is NT/2000 take the ownership of the folders and then try to delete them.

 

by: MFKPosted on 2002-05-21 at 05:05:29ID: 7023804

If the drive is accessible from DOS (not command prompt, actual DOS) then you can delete them without a problem. Just a suggestion...kicking in the DARK!!!!!

 

by: jatcanPosted on 2002-05-21 at 06:05:17ID: 7023934

See if you can rename the directory. What is the directory name anyway's?

ren oldname newname

then del newname

let us know if any of these work will ya?

 

by: jatcanPosted on 2002-05-21 at 07:46:53ID: 7024220

Some more to try:

if you have fat file system try this:


say your directory name is this: directory (space)
then type in this in a command prompt:


rmdir directory?

this will remove ALL directories that are named directory(then something else).

I just created a test folder on my c:\ and used the rmdir command to delete it with no switches or parameters at all...worked for me...what exactly IS the file name?

 

by: jatcanPosted on 2002-05-21 at 07:50:10ID: 7024235

Crap, I just realized that we don't even know the OS involved here. If it's *nix then it should be quite easy, if it's winblows then it may take a few years, millions of dollars in research and lots, and lots, of chips and pepsi, but we'll eventually get it...

 

by: SysExpertPosted on 2002-05-21 at 08:45:15ID: 7024417

For NT.2k/XP


JSI tip 2057 I went to the command line, switched to the directory and typed -- RD /S
    "" This removed the offending directories and files (with names nt doesn't like) per and in similar
      fashion to, what Tim Holman offered above which would probably have the same result.
   http://www.jsiinc.com/tip2000/rh2057.htm

I hope this helps !

 

by: CrazyOnePosted on 2002-05-21 at 16:46:22ID: 7025760

Ok I think what has happened is that the hacker has added a character to the end of the folder that Explorer does not recognize.

Try this open a command window and do this

If NT Win2000 or XP Open a CMD.EXE window. If Win9x-ME open COMMAND.COM.
CD to the top of the mess.
Use: DIR /X /A   to see the SHORT FILE NAMES of the files and directories there.
Use a combination of CD, RD, and DEL and the SHORT FILES names reported with DIR /X to delete your
way to the bottom and then back up the tree removing the files on the way down and the directories on
the way up.
Most likely there is NOT a protection issue here so you shouldn't need worry about ownership or file
protections.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

   /S      Removes all directories and files in the specified directory
           in addition to the directory itself.  Used to remove a directory
           tree.

   /Q      Quiet mode, do not ask if ok to remove a directory tree with /S




This MS KB article may help

BEGIN ARTICLE

How to Remove Files with Reserved Names in Windows (Q120716)

--------------------------------------------------------------------------------
The information in this article applies to:


Microsoft Windows 2000 , Professional
Microsoft Windows 2000 , Server
Microsoft Windows 2000 , Advanced Server
Microsoft Windows 2000 , Datacenter Server
Microsoft Windows NT Server versions 3.1 , 3.5 , 3.51 , 4.0
Microsoft Windows NT Workstation versions 3.1 , 3.5 , 3.51 , 4.0
Microsoft Windows NT Advanced Server
--------------------------------------------------------------------------------

SUMMARY
Because applications control the policy for creating files in Windows, files sometimes are created with illegal or reserved names, such as LPT1 or PRN. This article explains how to delete such files using the standard user interface.

MORE INFORMATION
NOTE : You must be logged on locally to the Windows computer to delete these files.

If the file was created on a file allocation table (FAT) partition, you may be able to delete it under MS-DOS using standard command line utilities (such as DEL) with wildcards. For example:

DEL PR?.*

-or-

DEL LPT?.*

These commands do not work on an NTFS partition as NTFS supports the POSIX subsystem and filenames such as PRN are legal under this subsystem. However, the operating system assumes the application that created them can also delete them; therefore, you can use commands native to the POSIX subsystem.

You can delete (unlink) these files using a simple, native POSIX application. For example, the Windows Resource Kit includes such a tool, Rm.exe.

NOTE : POSIX commands are case sensitive. Drives and folders are referenced differently than in MS-DOS. Windows 2000 and later POSIX commands must use the following usage syntax:
posix /c <path\command> [<args>] IE: posix /c c:\rm.exe -d AUX.

Usage assumes Rm.exe is either in the path, or the current folder:
rm -d // driveletter / path using forward slashes / filename
For example, to remove a file or folder named COM1 (located at C:\Program Files\Subdir in this example), type the following command:
rm -d "//C/Program Files/Subdir/COM1"
To remove a folder and its entire contents (C:\Program Files\BadFolder in this example), type the following command:
rm -r "//C/Program Files/BadFolder"
Another option is to use a syntax that bypasses the normal reserve-word checks altogether. For example, you can possibly delete any file with a command such as:
DEL \\.\ driveletter :\ path \ filename
For example:

DEL \\.\c:\somedir\aux

--------------------------------------------------------------------------------
Published Jun 3 1997 7:28AM  Issue Type  
Last Modifed Dec 22 2001 12:57PM  Additional Query Words 3.10 prodnt CON PRN AUX CLOCK$ NUL COM1 LPT1 LPT2 LPT3 COM2 COM3 COM4 winnt  
Keywords kbusage  

COPYRIGHT NOTICE. Copyright 2002 Microsoft Corporation, One Microsoft Way, Redmond, Washington 98052-6399 U.S.A. All rights reserved.

END ARTICLE


The Crazy One

 

by: jatcanPosted on 2002-05-22 at 06:16:40ID: 7026970

I created special charactor folders using telnet on a win2k system yesterday and had no problems whatsoever deleting them from Win2k, no special switches or anything like that...also, created a folder named test(hit space bar at end of name-then enter to apply the named space(space bar))had no problems deleting that either using the cmd prompt....so it must be win98

 

by: lwinkenbPosted on 2002-05-22 at 10:49:08ID: 7027681

Sorry about the shortage of information:

The OS is Microsoft Windows 2k Server

Since the file system is ntfs, any DOS tricks are out of the question.  I realize I can use a utility like system commander to convert the file system to fat32, but Im hoping there is an alternative solution.

Unfortunatly I am late for work right now, so I can try any of the ideas given above yet.  Will let you know if anything works later in the day.

thanks,

 

by: jatcanPosted on 2002-05-22 at 11:17:16ID: 7027805

So, this is really starting to bug me:

do this:

get yourself a linux boot floppy, you MUST know someone running linux...

then, use it to boot your PC

then mount the ntfs partition like this:

mount -t ntfs /dev/hdaX /mnt


(where X is the number of your drive, primary master in windows is hda0 and every drive is incremented by 1, so hda2,hda3,hda4 etc.etc,etc

 

by: CrazyOnePosted on 2002-05-22 at 11:40:47ID: 7027858

As long as you are able to boot into the server you most certainly can use the methods I outlined. I know it works  Just open cmd.exe and follow the intructions closely.

 

by: ridPosted on 2002-05-22 at 12:14:00ID: 7027943

We had a machine getting hit approximately like this, and the buggers who did it also did some damage to the CMD.EXE file. The box is still sitting in a corner waiting for a reinstall.... I'll listen to this with interest...

Regards
/RID

 

by: jatcanPosted on 2002-05-23 at 05:08:20ID: 7029494

OH YEAH, once you get onto the NTFS mount using the linux boot disk, cd to the directory where the file resides and type this at $ rmdir -rf <filename>

rm is remove -r = recursively(deletes all files and directories below specified dir to delete)

-f is to force the removal of the directory no matter what...

Cheers.

BTW---we still don't know the file name, take a screen shot and upload it to the web if you have to, we'd like to see it...

 

by: lwinkenbPosted on 2002-05-23 at 11:50:56ID: 7030254

Well, unfortunatly the problem was worse than I thought.  Instead of it just being an undeletable folder, it turned into tens of thousands of undeletable folders.  There must have been a virus somewhere that kept creating new folders in the old ones.

I tried all of the ideas listed here (actually, I didn't get around to using a linux disk to mount the drive), and nothing worked.  Using short file names didnt even work.  At this point my server drive was out of free space, and I had to solve the problem fast.  I ended up having to use system commander to convert the file system to FAT32, and then delete the folders that way.

Sorry I didn't have the time to let you guys come up with some more ideas, but the server had already been down 2 days, and that is 2 days too many.

 

by: jatcanPosted on 2002-05-24 at 03:51:01ID: 7031653

Yes agreed, linux disk would worked if you did the following command:

rm -rf /path/to/directory

 

by: EricWestboPosted on 2002-06-13 at 05:01:44ID: 7075229

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

It appears that this question has been abandoned.  Please take a moment to finalize the question & reward your points as appropriate.  If this question is not finalized within 7 days, Community Support will be requested to force close it.  Unless there is objection or further activity,  it will also be requested that points be awarded to the following expert(s) for their comments:

N/A; situation resolved by asker

If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post a request in Community support (with a link to this page) to refund your points.  The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt


/EW

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

 

by: NetminderPosted on 2002-07-07 at 08:17:29ID: 7135158

Per recommendation, points refunded and question closed.

Netminder
CS Moderator

 

by: LiveDrivePosted on 2003-05-29 at 09:57:56ID: 8607339

I ran into the same problem on my system.  Here is what solved it for me:
From a cmd prompt type the following command with this syntax: del "\\?\c:\dir_name_with_trailing_space "

 

by: tevjePosted on 2003-07-18 at 07:06:53ID: 8951952

Hi,

i ran the rmdir /s command on a hackers directory on my computer through the command prompt.. It worked perfectly! Thanx guys!

/tevje

 

by: bheavey11Posted on 2003-10-30 at 08:26:12ID: 9651285

just an fyi, i had a similar problem and CrazyOne's solution worked perfectly without much effort...i think he/she should be getting these points
i also posted crazyone's response to:
http://www.tek-tips.com/viewthread.cfm?SQID=679065&SPID=779&page=1

yeh it worked

 

by: lwinkenbPosted on 2003-10-30 at 09:28:59ID: 9651784

None of his suggestions worked for me at the time, which is why I didnt award the points.  Plus you're about a year and a half too late on your suggestion.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...