Posted on 25 August, 2008 By 8 Comments

Command Line Part 2 – Deleting Files

 

Presto, che è tardi! (by aldoaldoz)

About a month ago I wrote an article about why the command line was still useful. This morning I ran into a problem that once again proved the command line’s worth to me.

I was trying to delete an old website backup that was in the .zip format. When I tried to delete it, Windows gave me an error saying that the file could not be deleted because it was already in use. Since it was a zip file, there was no way it could be in use unless it was actually open. The file was not running so I couldn’t figure out why Windows wouldn’t allow me to delete it. I still don’t know why I was getting the error message but I was able to delete the file using the command line.

Go to Start > Programs > Accessories > Command Prompt. Navigate to the directory where the files is located using the cd command. When I open the command prompt it is already in the directory C:\Documents and Settings\myusername\. My file was two levels deeper so I did the following:

cd My Documents\kimwoodbridge

All I had to do now was type the delete command followed by the name of the file:

del mybackup.zip

Presto!! The file was gone.

The delete command can also be used to quickly delete the entire contents of a directory using wildcards. If I wanted to delete everything in the kimwoodbridge directory, I would navigate to that directory using the cd command and then type:

del *.*

This is telling the system to delete every filename with every type of file extension.

Do you ever use the command line? If so, what is your most common use? If not, do you not use it because you don’t need to or because you have never used it before?

photo credit: aldoaldoz


Thesis Theme for WordPress:  Options Galore and a Helpful Support Community

Keep Reading:
Posted In : Non WordPress Tips

Did you enjoy this article? I can assist you with your WordPress or Facebook project. Contact me and I will provide you with an estimate. You can also connect with me on Facebook or follow me on Twitter. If you are looking for Hosting, WordPress Theme, Newsletter or other recommendations, please view my detailed list

.


8 Responses to “Command Line Part 2 – Deleting Files”

Leave a Comment
You may use: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

CommentLuv badge

About

Kim Woodbridge is an accomplished Information and Technical Consultant specializing in the entire implementation of a WordPress based website including installation, theme design, upgrades, unique customizations and ongoing site maintenance.

Recent Comments

    • Eric Chapman: You rock; thank you!...
    • Victoria12: Wow! This are so cute. It is so much special when our kids do it on their own and give it us as a surprise gift.. So tou...
    • Catherine: I hope that the page owners have a plan for the transition. One concern is that Facebook doesn’t have a great method of ...
    • harm: You no longer can "Add to My Page" This used to be simple, using the facebook UI. Unfortunately facebook removed thi...
    • Phil Derksen: I was referencing plugin #1 in the list btw. :)...

Wordpress Services

  • Installation, upgrades and maintenance
  • Conversion of existing html and css templates
  • Theme and plugin recommendations
  • CSS customizations
  • Troubleshooting and tweaks for unique situations
  • Customization for individual blogging goals and needs
  • Training and advice