Solved File Exists with spaces in file path

MGeorge

New Member
Hello guys,


File Exists from Utility - File Management finds well "\\server\anyfolder\file.txt" but fails to "\\server\any folder\file.txt".
Do you have a tip?

Otherwise I can always:
1) use Get Files and count/browse through them,
2) write a C#/VB function?


Thank you for your helping hand,
Michaël
 
Last edited:

sivagelli

Well-Known Member
File Exists from Utility - File Management finds well "\\server\anyfolder\file.txt" but fails to "\\server\any folder\file.txt".
Do you have a tip?
I tried with file path having space in between and it worked well for me. Don't know what is causing trouble on your machine.
 
Last edited:

MGeorge

New Member
Thanks for your help.


Finally found a work around, a VB object with the following code: FileFound=System.IO.File.Exists(FilePath)


FYI

This one does not work:
\\files\#files\xxxx_xxxxxxx_xxxx\x000\xxxx0000 xxxxxxxxxxx xx\files\input\xxxxxx.dotm

This one works (no space char):
\\files\#files\xxxx_xxxxxxx_xxxx\x000\xxxx0000_xxxxxxxxxxx_xx\files\input\xxxxxx.dotm

The two following work (with or without space char):
C:\Any Folder\File.txt
C:\AnyFolder\File.txt


This one does not work:
C:\A#ny Folder\File.txt

My guess is that the '#' causes BP to process blank spaces differently...
 
Top