chflags nohidden not unhiding hidden files
Once I copied files via terminal from an iPod to a Mac and somehow they appeared hidden, chflags nohidden &lt;filename&gt; did not work, neither the same command with different option flags. Finally, I found this answer which worked fine. So:

xattr -d com.apple.FinderInfo &lt;filename&gt;
chflags nohidden &lt;filename&gt;
killall Finder (just in case)

I did it using * so I did not have to go one by one.
Hope it helps,