Saturday, March 28, 2015

linux - How should I mass rename files to fix Dropbox (false) detected "conflicting" version to "non-conflicting" version?

I have a project with many files, located in several sub-directories.
Dropbox somehow replaced the latest versions of some of those files with an old version and renamed the latest ones by adding " (Johns in Konflikt stehende Kopie 2013-03-17).txt" to tmen.



Now, I need to rename all files that have that addition " (Johns in Konflikt stehende Kopie 2013-03-17)" to the original filename, removing the old "authoritative" version (as Dropbox saw them).



Is there a shell script or something to run in terminal for a certain directory, which would do this recursively on a target directory?



For example:

"filename (Johns in Konflikt stehende Kopie 2013-03-17)" should be renamed to "filename" and in case there was already a file called filename, remove that first.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...