Re: [Dorset] removing spaces in file names

2021-12-02 Thread PeterMerchant
On 02/12/2021 15:22, John Carlyle-Clarke wrote: find . -name "* "" -type f -delete Well, that didn't delete the whole disk. It didn't do anything as far as I can see. I think you had a finger problem there. This worked and did exactly what I wanted: find . -name "* *" -type f -delete So

Re: [Dorset] removing spaces in file names

2021-12-02 Thread Victor Churchill
Hi Peter, I think that the command you give: find . -name "* *" -type f | rm *.* -v will indeed find all files named (anything1)(space)(anything2) - *however* : it will pass the names to "rm *.* which will ignore them and delete all files named (anything1)(dot)(anything2) ! (Which correspnds to

Re: [Dorset] removing spaces in file names

2021-12-02 Thread John Carlyle-Clarke
I'm hesitant to suggest something in case it wipes your root disk and kills your cat, but if you're happy to accept a bunch of disclaimers then find . -name "* "" -type f -delete should do what you want. On Thu, 2 Dec 2021 at 15:11, PeterMerchant wrote: > On 30/11/2021 15:42, PeterMerchant

Re: [Dorset] removing spaces in file names

2021-12-02 Thread PeterMerchant
On 30/11/2021 15:42, PeterMerchant wrote: I thought that my backup software Freefilesync was not backing up files with spaces in the names, so I found online a solution that changed all the spaces to -. find . -name "* *" -type f | rename 's/ /-/g'^C Now I have just checked my backup and

[Dorset] removing spaces in file names

2021-11-30 Thread PeterMerchant
I thought that my backup software Freefilesync was not backing up files with spaces in the names, so I found online a solution that changed all the spaces to -. find . -name "* *" -type f | rename 's/ /-/g'^C Now I have just checked my backup and discovered that files with spaces in them