tech_guy Posted January 10, 2011 Posted January 10, 2011 I was doing some housekeeping on one of our file servers and I noticed the backup routine was bleating about being unable to access a handful of folders in the users area. On closer inspection it looks like the affected users have created a folder to house website files, either manually or my copying a website. The folders have no security properties and the folder name ends with a space. The folders are empty. I can't delete them, taking ownership has no effect, and MS Article ID: 320081 is as much use as a eunuch in a brothel. Any suggestions much appreciated!
mattx Posted January 10, 2011 Posted January 10, 2011 Can you use RD or deltree from command line ? If not, I have a program which may help - I'll check to see what it's called.......
mattx Posted January 10, 2011 Posted January 10, 2011 This is the program that's got me out of a few problems before with this sort of thing. Download Unlocker 1.9.0 - FileHippo.com 2
tech_guy Posted January 10, 2011 Author Posted January 10, 2011 Can you use RD or deltree from command line ? If not, I have a program which may help - I'll check to see what it's called....... Nope & thanks!
tech_guy Posted January 10, 2011 Author Posted January 10, 2011 This is the program that's got me out of a few problems before with this sort of thing. Download Unlocker 1.9.0 - FileHippo.com Brilliant! Thanks Matt.
Hightower Posted January 10, 2011 Posted January 10, 2011 +1 for Unlocker. Had to use it this very morning to clean up some corrupt profiles. 1
tech_guy Posted January 10, 2011 Author Posted January 10, 2011 Great, thanks for that tip about Unlocker. The folders are now long gone. Mwahhahahaahaha.......
bossman Posted January 10, 2011 Posted January 10, 2011 Another +1 for Unlocker also Delinvfile found here DelinvFile Download at LastDownload. Delete files with invalid names Enjoy 2
gavlar Posted June 25, 2013 Posted June 25, 2013 I know this is an old thread but i just found it. I had the same problem as the OP and Unlocker worked perfect! Thanks
Arthur Posted June 26, 2013 Posted June 26, 2013 the folder name ends with a space. I had exactly the same issue recently after some Mac users created folders that had spaces and question marks at the end which Windows didn't like. I used the script below to strip out every single illegal character from all files and sub-folders contained within a folder. fix_filenames.pl #!/usr/bin/perl -w # This script renames all the files supplied as command-line args # where necessary so that the filename is acceptable to MS Windows # Cameron Hayne ([email protected]), June 2004 # http://hintsforums.macworld.com/showthread.php?t=25080 use strict; chomp @argV = ) unless @argV; # The Microsoft document at: [url]http://support.microsoft.com/kb/100108[/url] # says that the following characters are not allowed in filenames in each of # the specified file-systems: # FAT: . " / \ [ ] | : ; , = # NTFS: ? " / \ < > | : * # We don't do anything with the dot (.) since it clearly is allowable in spite # of what that document says. # And we don't do anything with the slash (/) since that character will not # occur in OS X file names and modifying it would cause troubles when a file # path (with directories) is specified. # The changing of the filenames is done via the 'tr' statements below. # Each occurrence of a character in the first curly brackets is replaced by the # character in the second curly brackets. foreach my $filename @argV) { my $orig_filename = $filename; $filename =~ tr{\\}{-}; $filename =~ tr{*?}{X}; $filename =~ tr{"><[]|:;,=}{_}; unless ($filename eq $orig_filename) { print "About to rename $orig_filename to $filename\n"; if (-e $filename) { print "Oops, there already exists a file named $filename\n"; print "Skipping the rename - you will have to do it manually\n"; } else { rename($orig_filename, $filename); } } } To run it, open Terminal on a Mac, make the script executable (chmod +x ~/Desktop/fix_filenames.pl), cd to the folder above the one you want to strip the illegal characters from and then run the command below. find -d . -print0 | xargs -0 ~/Desktop/fix_filenames.pl
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now