Finding and deleting zero sized files
Cool command-line trick for finding and deleting bogus files.
A consultant told me about a problem he had heard about where an IT person restored something on their server and they ended up with thousands of bogus files that had zero file size. The IT person was wondering if there was some easy way of finding all the zero sized files and deleting them. After discussing with some colleagues, the consultant came back with this solution which he later shared with me:
1. Open a command prompt on the server and type for /R %I in (*.*) do if “0”==”%~zI” echo del /f /q “%~fI” >> c:zerosizefiles.bat
2. Look through your zerosizefiles.bat file to make sure nothing important will get deleted.
3. Run the zerosizefiles.bat file.
Pretty cool use of the command line, eh?
Article written by MyComputerAid.com
2003 server - Sep 30, 2008 22:34 - 0 Comments
instant messaging srv records
More In Computers & PC
- Howto secure wordpress
- Simple wordpress upgrade from SSH howto
- permanently delete your facebook account
- Creating a Sound File
- Talking to the Mouse
Microsoft Outlook - Mar 22, 2009 11:22 - 0 Comments
Outlook: Duplicates in Mailbox
More In Computers & PC
- Howto secure wordpress
- Simple wordpress upgrade from SSH howto
- permanently delete your facebook account
- Creating a Sound File
- Talking to the Mouse
Microsoft Desktop, Web browsers and Internet, Windows 2000, Windows 7, Windows 98, Windows Firewall and networking, Windows Vista, Windows XP - Feb 8, 2010 18:09 - 0 Comments
Disable Proxy settings in IE
More In Computers & PC
- Howto secure wordpress
- Simple wordpress upgrade from SSH howto
- permanently delete your facebook account
- Creating a Sound File
- Talking to the Mouse
Leave a Reply
You must be logged in to post a comment.