for lack of knowing what the system (in my case Windows) would accept, I
used a kind of "brute force" method to check the validitiy of a file name:

1) check if file exits, then name is valid
2) check if file can be created, then file name is valid
3) cleanup

sample code.

::routine checkFileNameValid

  isValid = .True
  if sysIsFile(file) then return isValid

  fs = .stream~new(file)~~open
  if fs~state <> 'READY' then isValid = .False
  fs~close
  call sysFileDelete

return isvalid



2013/1/26 Staffan Tylen <staffan.ty...@gmail.com>

>
> Well, a go-n0go would be to enter a command that is looking for a file
>> name.
>> ?? No??
>>
>
> In a way your are right but consider this: A prompt is asking the user to
> enter some information, which will be used as part of a file name. If the
> code then tries to use it as a file name using whatever system function it
> would (probably) get OK or ERROR in return, but that's it. Not very
> helpful, especially to the user having to correct it.
>
> IMHO there should be a system function to verify the correctness of a file
> name...
>
> Staffan
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Oorexx-users mailing list
> Oorexx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-users
>
>
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to