Question

I have a folder full of invalid files. The properties says the folder is 1.28TB, but my flash drive is only 8GB. I can't delete the files so I tried a batch file, but it didn't work. I'm not sure if my batch was wrong or what.

I tried two files I found on this site:

cd "I:\Java\Workspace\GridWorld1\.metadata\.plugins\org.eclipse.core.resources\.projects\.org.eclipse.jdt.core.external.folders"
del *.
pause

and

set folder="C:\test"
cd /d I:\Java\Workspace\GridWorld1\.metadata\.plugins\org.eclipse.core.resources\.projects\.org.eclipse.jdt.core.external.folders
for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
pause

The second batch ran tons of lines and the final line was:

I:\Java\Workspace\GridWorld1\.metadata\.plugins\org.eclipse.core.r
ects\.org.eclipse.jdt.core.external.folders>(rmdir "er.Bundl.eLo"
"er.Bundl.eLo" /s/q )
The system cannot find the file specified.
The filename, directory name, or volume label syntax is incorrect.

I have almost no experience with batch files, but I have no idea how to delete these files. Here is link to a picture of the invalid files. Invalid File Picture

Was it helpful?

Solution

If the properties state that the folder contains 1.28T and it's only an 8G stick, there's almost certainly corruption on the file system. It's incredibly unlikely that a batch file will be able to achieve something that you can't do with direct commands since it is, after all, just a way to perform those direct commands from a script.

My advice would be to copy everything except the dodgy folder onto other media, format the stick (full format, not quick, just to be sure), then copy the saved files back.

That way, you keep everything except the stuff you're willing to delete anyway, and you can be reasonably certain the file system is consistent.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top