3 ms·
And if you have two files with the same name...
by amszmidt 2y ago
And if you have two files with the same name...
- tpmoney 2y agoThis made me curious about what macOS does. Using the finder, whether via menu command or drag and drop will rename the file automatically to ${filename} hh.mm.ss.${ext} But mv does not. Interestingly, it doesn’t appear Apple has added their own cli tool for moving something to the trash in the same way that they provide `open` or `pbcopy` or `pbpaste` You could execute inline AppleScript to tell the Finder to move the file to the trash, but that’s pretty roundabout
- chmaynard 2y agoI haven't tested it, but this tool probably handles name collisions in .Trash gracefully: https://github.com/ali-rantakari/trash https://github.com/ali-rantakari/trash