PC Review


Reply
Thread Tools Rate Thread

Check existence of file if file name has a space in it.

 
 
mc
Guest
Posts: n/a
 
      30th Sep 2008
I know how to check the existence of a file but what if the file name has a
space in it? For example, "Futures Curves.xls" When I use the
Len(dir(FileName), it is returning 0 for the len.

 
Reply With Quote
 
 
 
 
mc
Guest
Posts: n/a
 
      30th Sep 2008
Please ignore, I figured it out...

"mc" wrote:

> I know how to check the existence of a file but what if the file name has a
> space in it? For example, "Futures Curves.xls" When I use the
> Len(dir(FileName), it is returning 0 for the len.
>

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      30th Sep 2008
I suspect there's something wrong with 'FileName', the path perhaps; a space
in the file name would not prevent Dir from returning a value.

Regards,
Peter T

"mc" <(E-Mail Removed)> wrote in message
news:AEC3811F-7D78-41EC-AB8F-(E-Mail Removed)...
>I know how to check the existence of a file but what if the file name has a
> space in it? For example, "Futures Curves.xls" When I use the
> Len(dir(FileName), it is returning 0 for the len.
>



 
Reply With Quote
 
mc
Guest
Posts: n/a
 
      30th Sep 2008
Yes, you are correct, I figured that out a few minutes later. Thanks for the
response!

"Peter T" wrote:

> I suspect there's something wrong with 'FileName', the path perhaps; a space
> in the file name would not prevent Dir from returning a value.
>
> Regards,
> Peter T
>
> "mc" <(E-Mail Removed)> wrote in message
> news:AEC3811F-7D78-41EC-AB8F-(E-Mail Removed)...
> >I know how to check the existence of a file but what if the file name has a
> > space in it? For example, "Futures Curves.xls" When I use the
> > Len(dir(FileName), it is returning 0 for the len.
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check for file existence within own site John Microsoft ASP .NET 4 30th Jan 2008 06:42 AM
Check File Name Existence in Array =?Utf-8?B?S2lyayBQLg==?= Microsoft Excel Programming 2 6th Jun 2007 10:10 PM
I need to check for existence of a file on our website in "images"... trint Microsoft C# .NET 3 23rd Apr 2007 05:24 PM
Check for existence of a file =?Utf-8?B?REtT?= Microsoft Excel Programming 4 9th Apr 2007 08:46 PM
Check File Existence =?Utf-8?B?Q2F0YWxpbg==?= Microsoft Excel Programming 5 10th May 2006 10:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:24 AM.