Hello everyone
I am reading filenames and some details recursively, starting from a user selected folder.
I tried scanning an entire drive to test the code and ran into a filename too long error. Admittedly the offending file was an IE temp file in the recycle bin followed by a bunch of post requests. But the file is there, so this should be a legal filename according to Vista:
Any ideas how to read this filename? I could skip recycle bins, but i'm thinking this might crop up in other folders too.
I am reading filenames and some details recursively, starting from a user selected folder.
VB.NET:
Dim Path As New DirectoryInfo(NewPath)
Dim File As FileInfo
' Get details for each file
For Each File In Path.GetFiles
...
Next
I tried scanning an entire drive to test the code and ran into a filename too long error. Admittedly the offending file was an IE temp file in the recycle bin followed by a bunch of post requests. But the file is there, so this should be a legal filename according to Vista:
VB.NET:
D:\$RECYCLE.BIN\S-1-5-21-2585337480-3818995355-2129148593-1000\$RB9T6L8\some_dir\some_user\Internet\Temporary Internet Files\Content.IE5\00HOU27X\rm.seasonal[2].recipe;abr=!webtv;dcopt=ist;rid=240114;kw=Indian;kw=Side;kw=Curry;kw=Breakfast;kw=ba;ad=N;kw=recipes;kw=food;kw=views;kw=240114;sz=728x90;tile=1;ord=7313262760627928
Any ideas how to read this filename? I could skip recycle bins, but i'm thinking this might crop up in other folders too.