mibuso.com

Microsoft Business Solutions online community
It is currently Fri Nov 28, 2014 7:46 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Single line, Make sure Directory Path ends with '\'
PostPosted: Tue Apr 29, 2008 2:43 pm 
Offline

Joined: Mon Mar 24, 2008 2:57 pm
Posts: 277
Location: Virginia
This is by no means a huge tip or trick, and it is quite bulky, but I think it's nifty. I use it all the time :mrgreen:

Code: Select all
DirPath := DELSTR(DirPath,STRLEN(DirPath),STRPOS(DirPath[STRLEN(DirPath)],'\'))+'\';


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 29, 2008 3:50 pm 
Offline

Joined: Tue Aug 17, 2004 3:06 pm
Posts: 1088
Location: Heeswijk
Country: Netherlands (nl)
8)
Nice variant you made!

_________________
----------------------------------
Tino Ruijs
Microsoft Dynamics NAV (Navision) specialist


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 29, 2008 5:19 pm 
Offline

Joined: Mon Mar 24, 2008 2:57 pm
Posts: 277
Location: Virginia
tinoruijs wrote:
8)
Nice variant you made!


Thanks. :D


Top
 Profile  
 
 Post subject: or use CU11501 for some EU ppl should work
PostPosted: Fri Jul 18, 2008 2:03 pm 
Offline

Joined: Thu Nov 01, 2001 7:01 am
Posts: 67
Location: 3 Lakes
Country: Switzerland (ch)
or like CU11501 8)

if (COPYSTR(_Input,STRLEN(_Input)) IN ['\','/']) then
->please give correct path name.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Jul 18, 2008 4:24 pm 
Offline

Joined: Mon Mar 24, 2008 2:57 pm
Posts: 277
Location: Virginia
Well that code is a bit different. It's just checking if the string ends with \ or / .

The line of code I have provided doesn't check nor provide a response to the user. It just makes sure the ending of the path has a \ :wink:


Top
 Profile  
 
 Post subject: Re: Single line, Make sure Directory Path ends with '\'
PostPosted: Mon Feb 09, 2009 12:34 pm 
Offline

Joined: Mon Feb 09, 2009 12:28 pm
Posts: 11
a bit shorter way:
Code: Select all
Dir := DELCHR(Dir, '>', '\') + '\';


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: