How I Synchronize Files to Delete
- Right-click on the folder that I want to target and synchronize. Select "Synchronize.."
- From the Synchronize with Remote Server dialog, under "Direction", choose "Put newer files to remote".
- Check the "Delete remote files" checkbox. This is the important part. I think "Put" and "Get" are irrelevant for what we're trying to accomplish here.
- Click "Preview..."
- The "Synchronize" dialog will appear, listing what files will be deleted. If you have files that are identified under the "Put" Action, of which you aren't ready to put yet, just select all those files, and use the circle-backslash symbol in the bottom left to ignore those files.
- Now for the heart-stopping dialog box: "Do you really want to delete the selected file(s)? YES. Yes, I do.
That's it! It's pretty straight-forward, and I no longer have orphan files living on my production server. Word from the wise, take small chunks at a time. For me, this is a process I embrace while making revisions to file names and deleting documents within my local environment. You could do it at the root level, but I'm not ready for that mess yet.
A Final Thought
The division I work for hasn't instated any type of version control, like Git (it's a dream of mine, though!), so I'm left wondering if that would replace the issue of orphan files and file renaming. Until then, this is my method to cross that divide.
My Question to You
What text editor do you use? And how are you able to synchronize your files between local and production environments?