Windows Server 2016 Standard
I am trying to delete lots of (tens of thousands of) files from a server shared drive.
Using the standard Windows method of selecting folders and deleting seemed to remove most of them, however some still remain. I'm not able to delete these via Windows, I keep getting the error;
This folder contains files whose name are too long for the recycle bin
I've seen this answer about using 7zip to delete, but that also doesn't work and produces the same error regarding file names being too long.
So, i've decided to install git and try use the command line but this is resulting is permissions issues.
When logged in as jo, and viewing the permissions of the shared drive (Z), I see;
jo@myserver MINGW64 /z
$ ls -ald
drwxr-xr-x 1 jo 1049089 0 Aug 11 16:55 ./
When I list the contents and view the permissions I see;
jo@myserver MINGW64 /z
$ ls -al
total 16
drwxr-xr-x 1 jo 1049089 0 Jul 22 09:45 '$RECYCLE.BIN'/
drwxr-xr-x 1 jo 1049089 0 Aug 11 16:55 ./
drwxr-xr-x 1 jo 1049089 0 Apr 27 11:56 ../
drwxr-xr-x 1 jo 1049089 0 Aug 12 12:35 'part 2'/
drwxr-xr-x 1 jo 1049089 0 Aug 11 22:09 'System Volume Information'/
drwxr-xr-x 1 jo 1049089 0 May 26 14:08 final/
When I try to delete the part 2 directory and it's contents I get a permissions error for every file within this directory (see sample output below);
jo@myserver MINGW64 /z
$ rm -rf 'part 2'
rm: cannot remove 'part 2 file1.... ...': Permission denied
rm: cannot remove 'part 2 file2.... ...': Permission denied
I am logged into the server as the user jo, this user is a server administrator and appears to be the owner of the Z drive and the directory I am attempting to delete?
The only difference I can see with this drive is that I have made it a network share and is available to other users on the network.
Any ideas why this isn't working or if there's anything else I can do to troubleshoot?
Ideally I don't want to use any other third party applications, other than git.