I have a file called .DS_store on the desktop that will not delete. I have renamed it and deleted it and it just reappears again.
If i copy it to downloads it is greyed out so i take it it is a hidden file ?
That file contains the Finder settings (like column order etc) for the Desktop folder. Like Nermal said, it would normally be a hidden file. Have you been messing about in Terminal or some utility that may have caused hidden files to be shown?
Actually any files/directories whose names start with the dot character (dot files) are treated as hidden and thus it shouldn't be necessary to set their hidden flag. Thus as Weaselboy suggets, the OP has most likely (maybe inadvertently) changed the Finder settings to show such hidden files. Usually it's the following setting (commands for the Terminal follow):
- to verify the current value - normally it should return an error "The domain/default pair of (/Users/.../Library/Preferences/com.apple.finder, AppleShowAllFiles) does not exist" or value "0":
defaults read com.apple.finder AppleShowAllFiles
- to enable - e.g. reveal hidden files:
defaults write com.apple.finder AppleShowAllFiles -boolean TRUE
- to disable - e.g. revert to the default state when hidden files are not shown:
defaults delete com.apple.finder AppleShowAllFiles