Source language: Translate to:

FolderBox

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

FolderBox

Postby smartmedia » Sat May 05, 2007 10:46 am

Hi...

I using the command
FolderBox "Choose folder:" "[Folder]"

if the folder is
C:\Program Files\NeoBook 4\Pub
i get it without the "\" at the end...
I want to get it with the "\" at the end.

If the folder is the root i get
c:\

Can you fix it...???
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Sam Cox » Sat May 05, 2007 6:19 pm

Code: Select all
FolderBox "Choose folder:" "[Folder]"
SetVar "[Folder]" "[Folder]\"
StrReplace "[Folder]" "\\" "\" "[Folder]"

This works by unconditionally slapping a "\" on the end and then replacing "\\" with "\" in the case that [Folder] already ends with a single "\".
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby smartmedia » Sun May 06, 2007 12:08 am

Hi...

Thanks Sam,

That is worked smoothly... I wonder if this is the way should be...

Thanks again.
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

About filelist

Postby carlos torres » Mon May 07, 2007 5:52 am

Hi Smartmedia... working around... I found David Esperalta Plugin Dec_Plus that has several functions related with files and directories. One of those is

dec_ListarRecursivamente "[pubDir]MyDir\" "*.txt"

This function list all the files contained in a directory including subs. Another one is:

dec_ListarArchivosDirectorio "[pubDir]MyDir\" "*.txt"

It doesn't include subs in your/its list

Hopefully it helps

regards
carlos t
User avatar
carlos torres
 
Posts: 289
Joined: Mon May 02, 2005 8:14 am
Location: Pamplona, Colombia


Return to NeoBook Action Commands

Who is online

Users browsing this forum: Gaev and 1 guest