corrupt folders?

Started by RAK, December 24, 2013, 02:45:12 AM

Previous topic - Next topic

RAK

When searching for files in User directories
fileName = 'file.txt'
handle=srchInit("c:\users|", fileName ,"","",16)
filePathName=srchNext(handle)

It is returning the following string where the file does not exist. I think it's returned due to an error as the path is too long for windows. It seems have been created by adobe? I did read that the 'Application Data' folder is actually redirected to 'appData'. I can go to this folder if I paste it in a folder path - but cannot go back to delete the structure. Any Ideas on what I could do? I want to complete the development of this WB script and cannot on my machine due to this returned path.. Sure is Strange.. 

C:\Users\Roy Kaplan\AppData\Roaming\SoftSell\WindMan\Data\Launch\DeskTops\IE2.dtf"   50,100,550,500,2|Untitled - Notepad|"notepad.exe"|"C:\Users\All Users\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Adobe\CameraRaw\CameraProfiles\Camera\Canon EOS 10"

snowsnowsnow

Gee...

I was sure this thread was going to be about origami experts taking bribes.

kdmoyers

Quote from: snowsnowsnow on December 24, 2013, 04:13:54 AMI was sure this thread was going to be about origami experts taking bribes.
Unlikely. The origami yakusa are merciless; to openly discuss their criminal activities is to invite assassination. Why, I heard about a guy who.. URK.... ahh.... (thump)
The mind is everything; What you think, you become.

snowsnowsnow

Quote from: kdmoyers on December 24, 2013, 07:13:20 AM
Quote from: snowsnowsnow on December 24, 2013, 04:13:54 AMI was sure this thread was going to be about origami experts taking bribes.
Unlikely. The origami yakusa are merciless; to openly discuss their criminal activities is to invite assassination. Why, I heard about a guy who.. URK.... ahh.... (thump)

Good point.  I'll promise to be careful.

Deana

Quote from: RAK on December 24, 2013, 02:45:12 AM
When searching for files in User directories
fileName = 'file.txt'
handle=srchInit("c:\users|", fileName ,"","",16)
filePathName=srchNext(handle)

It is returning the following string where the file does not exist. I think it's returned due to an error as the path is too long for windows. It seems have been created by adobe? I did read that the 'Application Data' folder is actually redirected to 'appData'. I can go to this folder if I paste it in a folder path - but cannot go back to delete the structure. Any Ideas on what I could do? I want to complete the development of this WB script and cannot on my machine due to this returned path.. Sure is Strange.. 

C:\Users\Roy Kaplan\AppData\Roaming\SoftSell\WindMan\Data\Launch\DeskTops\IE2.dtf"   50,100,550,500,2|Untitled - Notepad|"notepad.exe"|"C:\Users\All Users\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Adobe\CameraRaw\CameraProfiles\Camera\Canon EOS 10"

I suspect that you are dealing with a reparse point. Starting in File and Folder Finder Extender: Version 44005 Aug. 28, 2013, we added support for a new flag value of 128 (no reparse points) to the fafOpen function's flags parameter.  When set this flag prevents the extender from  including file system objects implemented with reparse points in searches performed using the returned search context. Reparse points are used by the  NTFS file system to implement symbolic links, directory junctions and directory mount points among other things. Reparse points, and their associated  filters and applications provided by 3rd party vendor may also be present on a system.

Also to specify an extended-length path, a maximum path of 32,767 characters, use the "\\?\" prefix. The "\\?\" prefix to a path string tells this function to disable all string parsing and to send the string that follows it straight to the file system. For example, if the file system supports large paths and file names, you can exceed the MAX_PATH (260) limits that are otherwise enforced.  For example,  "\\?\D:\very long path" *or* "\\?\UNC\server\share".

The code might look something like this:

Code (winbatch) Select
;Load Appropriate Extender
AddExtender( "WWFAF44I.DLL", 44005, "WWFAF64I.DLL" )
outfile =  Dirscript():'output.txt'
username = Environment('USERNAME')

; Initialize flags for readability
fHidden = 1      ; Include hidden files
fSystem = 2      ; Include system files
fFolders = 4     ; Inspect  subfolder names also
fFindFolders = 8 ; Only inspect subfolder names not file names
fRecurse = 16    ; Recurse through subfolders
fNoPathInfo = 32 ; Do not return path information to files or folders found
fNoRedirect = 64 ; Do not turn off file redirection for x64 windows
fNoReparse = 128 ; Ignore reparse points. Prevents the extender from including file system objects implemented with reparse points in searches performed using the returned search context.

; Open a search handle
fhandle = fafOpen( "\\?\c:\users\":username, "*", fRecurse|fNoReparse )
filelist = ''
; Perform the search
While @TRUE
   sFound = fafFind( fHandle )
   If sFound == '' Then Break
   If filelist=='' then filelist = sFound
   Else filelist = filelist:@crlf:sFound
EndWhile
; Close the search handle
fafClose( fHandle )
FilePut( outfile, filelist )
Run( outfile, '')

Exit





Deana F.
Technical Support
Wilson WindowWare Inc.

RAK

Hi Deana,
Sounds like you nailed the issue. I am using wsrch34i.. I will recode to use the new search dll and use the 128 flag.. I was able do get it coded by specifying a specific user directory for testing. I will recode to prevent similar issues on other machines.

could you explain a little about 'newer' extender function: AddExtender( "WWFAF44I.DLL", 44005, "WWFAF64I.DLL" )?
what is the '44005' for and please confirm that the 64 bit dll function is embedded in the the 44 dll file.

Thanks for your help - you are awesome..
Roy

RAK

could you explain the use of  "\\?\c:\users\"  ?

thanks

Deana

Quote from: RAK on December 24, 2013, 02:52:23 PM
Hi Deana,
Sounds like you nailed the issue. I am using wsrch34i.. I will recode to use the new search dll and use the 128 flag.. I was able do get it coded by specifying a specific user directory for testing. I will recode to prevent similar issues on other machines.

could you explain a little about 'newer' extender function: AddExtender( "WWFAF44I.DLL", 44005, "WWFAF64I.DLL" )?
what is the '44005' for and please confirm that the 64 bit dll function is embedded in the the 44 dll file.

Thanks for your help - you are awesome..
Roy

The File and Folder Finder extender is a streamlined version of the original File Search extender that emphasizes speedy searches for files and folder on local drives and network shares.  The File and Folder Finder extender can be used to:


  • Find files and folders on the local file system
  • Find files and folders on network shares
  • Find files and folders using wildcard characters
  • Find files and folder in sub directories
  • Use file and folder attributes to narrow search results.


The File and Folder Finder extender cannotââ,¬Â¦


  • Search the contents of a file. (Use the File Search extender instead)
  • Search using Windows shell's special folder names.

Note: To help make the File and Folder Finder extender searches faster, its use is restricted to Microsoft Windows 2000 or newer.  This applies to both the client and server versions of the operating system.  The original File Search extender can still be used on older versions of Microsoft Windows.




The AddExtender function now accepts 3 possible parameters. The second and third parameters are optional.

QuoteSyntax:
AddExtender(filename [,version [,alternatefilename]]

Parameters:
(s) filename:  WIL extender Dll filename

(s) extender version: [optional] minimum required extender version number.

(s) alternate filename:  [optional] 64-bit WIL extender Dll filename. Note that 64-bit WinBatch still treats the first parameter as the file name of a 64-bit extender when no third parameter is present.





The 44005 indicates the minimum required extender version number.

The file and folder extender included two separate dlls: 32-bit dll WWFAF44I.DLL and a 64-bit dll named WWFAF64I.DLL




Deana F.
Technical Support
Wilson WindowWare Inc.