Can't delete files/folders

Status
Not open for further replies.

pclab

Cadet
Joined
Jan 10, 2014
Messages
3
Hi

I have this weird case: I need to delete some files/folders that were wrongly copied to the NAS.
These folders are the Programs and Windows folders that there are not need to copy.
The problem is that now, when I try to delete them, the system says that it can't delete because of the lenght of the name of the files and I don't have permissions or the files are in use.
I have tried with some software that claim to delete the kind of thinks, but none of them worked.
How can I delete these files?
Thank You
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I presume you are using Windows? This is a Windows limitation. There is no workaround that I am aware of. Your best solution is to go to the command line on your server and delete them locally.

As another option, you could bootup a Linux LiveCD and delete them from the shares since Linux doesn't have the same limitations. ;)
 

pclab

Cadet
Joined
Jan 10, 2014
Messages
3
Hi Cyberjock

Yes, it's a windows system.
I could try with a Live CD, good idea.
But about the terminal of the Nas, wich commands do I use?
I have tried to get that info, but I couldn't do it. I can browse trough the folders, but can't delete them.
Thank You
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Use "cd" to change to the directory you want. Then the "rm" command to remove files/directories. You can delete a directory and all subdirectories and files with 'rm -R'. Google for the manpages for rm on FreeBSD to get a list of all of the parameters.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Wow, Cyberjock, that was downright philanthropic!! Normally I'd have expected you to say in answer to this question: "Jesus Tap-Dancing Christ Take the WHEEL! You mean to tell me you're running a FreeNAS and don't have any idea how to change directories or delete files on a UNIX-type system? LOLOLOLOL"

You must be turning over a new leaf for 2014!
 

languy

Dabbler
Joined
Jun 27, 2012
Messages
15
Or you could if you wanted use a common windows trick to access files/paths that are too long. Map a drive to the share and then use the syntax \\?\<mapped drive letter>:\pathtoolongfolder\file.ext. That is, add a \\?\" to the full path to the file. This API allows Windows to access a file name that is up to 32000 characters in length. It's a pain in the butt, but doable. Otherwise drop to a shell on the FreeNAS box and remove it that way.
 
Status
Not open for further replies.
Top