Re: [WebDNA] Create Folder

This WebDNA talk-list message is from

2019


It keeps the original formatting.
numero = 114493
interpreted = N
texte = 2112 --0000000000008b40920581b601bc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Steve, Here's a function I use. - Tom [!] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ### Create Folder ### +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ FUNCTION Name: smCreateFolder ** Description: Create Folder with 770 permissions ** Input: folderPath =3D (the url to the folder) - required folderPerms =3D (folder permissions) - optional, defaults to 770 ** usage: [smCreateFolder folderPath=3D] [/!][function name=3DsmCreateFolder][!] [/!][text]tReturn=3D[/text][!] ### Default values ### [/!][text]tFOLDERPATH=3D[/text][!] [/!][text]tPERMISSIONS=3D770[/text][!] ### Incoming [params_string] values ### [/!][showif [url][params_string][/url]^folderPath][text]tFOLDERPATH=3D[folderPath][/tex= t][/showif][!] [/!][showif [url][params_string][/url]^folderPerms][text]tPERMISSIONS=3D[folderPerms][/= text][/showif][!] ### Do nothing if required fields are not passed through ### [/!][hideif [url][tFOLDERPATH][/url]]=3D][!] ### Hideif the folder exists ### [/!][hideif [fileinfo file=3D[tFOLDERPATH]][exists][/fileinfo]=3DT][!] ### Create the folders to the final folder ### [/!][text]varPATH=3D[showif [url][tFOLDERPATH][/url]~[url]/[/url]]/[/showif][/text][!] [/!][listwords words=3D[url][tFOLDERPATH][/url]&delimiters=3D/][!] [/!][hideif [fileinfo file=3D[varPATH][word]][exists][/fileinfo]=3DT][!] [/!][createfolder path=3D[varPATH][word]][!] [/!][text]varFULLPATH=3D[fileinfo file=3D[varPATH][word]][fullpath][/fileinfo][/text][!] [/!][shell]/bin/chmod [tPERMISSIONS] [varFULLPATH][/shell][!] [/!][/hideif][!] [/!][text]varPATH=3D[varPATH][word]/[/text][!] [/!][/listwords][!] [/!][/hideif][!] [/!][/hideif][!] [/!][return][tReturn][/return][!] [/!][/function] On Tue, 12 Feb 2019 at 16:17, Steve Craig wrote: > Hi > > Just a quick question, what=E2=80=99s the quickest way to look in a folde= r and > check whether a folder of a particular name exists and if not create it? > > Just need to get something done really quickly. > > Thanks for any help. > > Cheers > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Steve Craig - Forest Products (Leisure) Ltd > Tel +44 1330 860505 Mob +44 7778 007607 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > http://www.forestlogcabins.com > Email: steve@forestlogcabins.com > Skype: s.craig - iChat: steve.craig > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Standard terms and conditions available here > http://forestlogcabins.com/Terms.html > Any sketches or illustrations supplied are subject to possible small > changes on the final factory plans. > > > > > > > --------------------------------------------------------- This message is > sent to you because you are subscribed to the mailing list talk@webdna.us > To unsubscribe, E-mail to: talk-leave@webdna.us archives: > http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.u= s --0000000000008b40920581b601bc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Steve,

Here's a fu= nction I use.

- Tom


<= /div>




[!= ]


+++++++++++++++++++++++++++++++++= ++++++++++++++++++++++++++
### =C2=A0Create Folder =C2=A0###
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FUNCTION Name: smCreateFolder
=C2=A0 ** Description: = Create Folder with 770 permissions
=C2=A0 ** Input:=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 folderPath =3D (the url to the folder) - req= uired
=C2=A0 =C2=A0 =C2=A0 =C2=A0 folderPerms =3D (folder permiss= ions) - optional, defaults to 770
=C2=A0 ** usage:=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 [smCreateFolder folderPath=3D<path to the = folder>]

[/!][function name=3DsmCreateFolder][!= ]
= [/!][text]tReturn=3D[/text][!]

### =C2=A0Defa= ult values =C2=A0###

[/!][text]tFOLDERPATH=3D[/text][!= ]
= [/!][text]tPERMISSIONS=3D770[/text][!]

### = =C2=A0Incoming [params_string] values =C2=A0###

[/!][s= howif [url][params_string][/url]^folderPath][text]tFOLDERPATH=3D[folderPath= ][/text][/showif][!]
[/!][showif [url][params_string][/url]^folderP= erms][text]tPERMISSIONS=3D[folderPerms][/text][/showif][!]

<= /span>### =C2=A0Do nothing if required fields are not passed through =C2=A0= ###

[/!][hideif [url][tFOLDERPATH][/url]]=3D][!]
=

### =C2=A0Hideif the folder exists =C2=A0###
[/!][hideif [fileinfo file=3D[tFOLDERPATH]][exists][/fileinfo]=3D= T][!]

### =C2=A0Create the folders to the final f= older =C2=A0###
[/!][text]varPATH=3D[showif [url][tFOLDERPATH][/url= ]~[url]/[/url]]/[/showif][/text][!]
[/!][listwords words=3D[url][tF= OLDERPATH][/url]&delimiters=3D/][!]
[/!][hideif [fileinfo file= =3D[varPATH][word]][exists][/fileinfo]=3DT][!]
[/!][createfolder = path=3D[varPATH][word]][!]
[/!][text]varFULLPATH=3D[fileinfo file= =3D[varPATH][word]][fullpath][/fileinfo][/text][!]
[/!][shell]/bi= n/chmod [tPERMISSIONS] [varFULLPATH][/shell][!]
[/!][/hideif][!]
= [/!][text]varPATH=3D[varPATH][word]/[/text][!]
[/!][/listwo= rds][!]

[/!][/hideif][!]
[/!][/hideif][!]
=

[/!][return][tReturn][/return][!]
[/!][/function]=



On = Tue, 12 Feb 2019 at 16:17, Steve Craig <steve@asylumweb.com> wrote:
Hi

=
Just a quick question, what=E2=80=99s the quickest way to look in a fo= lder and check whether a folder of a particular name exists and if not crea= te it?

Just need to get something done really quic= kly.

Thanks for any help.

Cheers
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D
Steve Craig - Forest Products (Leisure) Ltd
Tel +44 1330 860505 Mob +44 7778 007607
=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D
Skype: s.craig - iChat: steve.craig
= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Stan= dard terms and conditions available here=C2=A0http://forestlogcabins.com/Terms.html<= /a>


=
<= br class=3D"gmail-m_-4488695309554801257Apple-interchange-newline">

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@w= ebdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: suppo= rt@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --0000000000008b40920581b601bc-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Create Folder (Steve Craig 2019)
  2. Re: [WebDNA] Create Folder (Tom Duke 2019)
  3. Re: [WebDNA] Create Folder (Palle Bo Nielsen 2019)
  4. [WebDNA] Create Folder (Steve Craig 2019)
2112 --0000000000008b40920581b601bc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Steve, Here's a function I use. - Tom [!] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ### Create Folder ### +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ FUNCTION Name: smCreateFolder ** Description: Create Folder with 770 permissions ** Input: folderPath =3D (the url to the folder) - required folderPerms =3D (folder permissions) - optional, defaults to 770 ** usage: [smCreateFolder folderPath=3D] [/!][function name=3DsmCreateFolder][!] [/!][text]tReturn=3D[/text][!] ### Default values ### [/!][text]tFOLDERPATH=3D[/text][!] [/!][text]tPERMISSIONS=3D770[/text][!] ### Incoming [params_string] values ### [/!][showif [url][params_string][/url]^folderPath][text]tFOLDERPATH=3D[folderPath][/tex= t][/showif][!] [/!][showif [url][params_string][/url]^folderPerms][text]tPERMISSIONS=3D[folderPerms][/= text][/showif][!] ### Do nothing if required fields are not passed through ### [/!][hideif [url][tFOLDERPATH][/url]]=3D][!] ### Hideif the folder exists ### [/!][hideif [fileinfo file=3D[tFOLDERPATH]][exists][/fileinfo]=3DT][!] ### Create the folders to the final folder ### [/!][text]varPATH=3D[showif [url][tFOLDERPATH][/url]~[url]/[/url]]/[/showif][/text][!] [/!][listwords words=3D[url][tFOLDERPATH][/url]&delimiters=3D/][!] [/!][hideif [fileinfo file=3D[varPATH][word]][exists][/fileinfo]=3DT][!] [/!][createfolder path=3D[varPATH][word]][!] [/!][text]varFULLPATH=3D[fileinfo file=3D[varPATH][word]][fullpath][/fileinfo][/text][!] [/!][shell]/bin/chmod [tPERMISSIONS] [varFULLPATH][/shell][!] [/!][/hideif][!] [/!][text]varPATH=3D[varPATH][word]/[/text][!] [/!][/listwords][!] [/!][/hideif][!] [/!][/hideif][!] [/!][return][tReturn][/return][!] [/!][/function] On Tue, 12 Feb 2019 at 16:17, Steve Craig wrote: > Hi > > Just a quick question, what=E2=80=99s the quickest way to look in a folde= r and > check whether a folder of a particular name exists and if not create it? > > Just need to get something done really quickly. > > Thanks for any help. > > Cheers > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Steve Craig - Forest Products (Leisure) Ltd > Tel +44 1330 860505 Mob +44 7778 007607 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > http://www.forestlogcabins.com > Email: steve@forestlogcabins.com > Skype: s.craig - iChat: steve.craig > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Standard terms and conditions available here > http://forestlogcabins.com/Terms.html > Any sketches or illustrations supplied are subject to possible small > changes on the final factory plans. > > > > > > > --------------------------------------------------------- This message is > sent to you because you are subscribed to the mailing list talk@webdna.us > To unsubscribe, E-mail to: talk-leave@webdna.us archives: > http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.u= s --0000000000008b40920581b601bc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Steve,

Here's a fu= nction I use.

- Tom


<= /div>




[!= ]


+++++++++++++++++++++++++++++++++= ++++++++++++++++++++++++++
### =C2=A0Create Folder =C2=A0###
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FUNCTION Name: smCreateFolder
=C2=A0 ** Description: = Create Folder with 770 permissions
=C2=A0 ** Input:=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 folderPath =3D (the url to the folder) - req= uired
=C2=A0 =C2=A0 =C2=A0 =C2=A0 folderPerms =3D (folder permiss= ions) - optional, defaults to 770
=C2=A0 ** usage:=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 [smCreateFolder folderPath=3D<path to the = folder>]

[/!][function name=3DsmCreateFolder][!= ]
= [/!][text]tReturn=3D[/text][!]

### =C2=A0Defa= ult values =C2=A0###

[/!][text]tFOLDERPATH=3D[/text][!= ]
= [/!][text]tPERMISSIONS=3D770[/text][!]

### = =C2=A0Incoming [params_string] values =C2=A0###

[/!][s= howif [url][params_string][/url]^folderPath][text]tFOLDERPATH=3D[folderPath= ][/text][/showif][!]
[/!][showif [url][params_string][/url]^folderP= erms][text]tPERMISSIONS=3D[folderPerms][/text][/showif][!]

<= /span>### =C2=A0Do nothing if required fields are not passed through =C2=A0= ###

[/!][hideif [url][tFOLDERPATH][/url]]=3D][!]
=

### =C2=A0Hideif the folder exists =C2=A0###
[/!][hideif [fileinfo file=3D[tFOLDERPATH]][exists][/fileinfo]=3D= T][!]

### =C2=A0Create the folders to the final f= older =C2=A0###
[/!][text]varPATH=3D[showif [url][tFOLDERPATH][/url= ]~[url]/[/url]]/[/showif][/text][!]
[/!][listwords words=3D[url][tF= OLDERPATH][/url]&delimiters=3D/][!]
[/!][hideif [fileinfo file= =3D[varPATH][word]][exists][/fileinfo]=3DT][!]
[/!][createfolder = path=3D[varPATH][word]][!]
[/!][text]varFULLPATH=3D[fileinfo file= =3D[varPATH][word]][fullpath][/fileinfo][/text][!]
[/!][shell]/bi= n/chmod [tPERMISSIONS] [varFULLPATH][/shell][!]
[/!][/hideif][!]
= [/!][text]varPATH=3D[varPATH][word]/[/text][!]
[/!][/listwo= rds][!]

[/!][/hideif][!]
[/!][/hideif][!]
=

[/!][return][tReturn][/return][!]
[/!][/function]=



On = Tue, 12 Feb 2019 at 16:17, Steve Craig <steve@asylumweb.com> wrote:
Hi

=
Just a quick question, what=E2=80=99s the quickest way to look in a fo= lder and check whether a folder of a particular name exists and if not crea= te it?

Just need to get something done really quic= kly.

Thanks for any help.

Cheers
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D
Steve Craig - Forest Products (Leisure) Ltd
Tel +44 1330 860505 Mob +44 7778 007607
=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D
Skype: s.craig - iChat: steve.craig
= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Stan= dard terms and conditions available here=C2=A0http://forestlogcabins.com/Terms.html<= /a>


=
<= br class=3D"gmail-m_-4488695309554801257Apple-interchange-newline">

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@w= ebdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: suppo= rt@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --0000000000008b40920581b601bc-- . Tom Duke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

OOPS (was RE: Email Scavengers) (2003) Setting up the server (1997) Running 2 two WebCatalog.acgi's (1996) [delete] problem (1997) Mime Headers for Mail (1998) File Uploads... (1997) flushdatabases (1997) Email Formatting and Encryption (1998) delete a record and ssl (2005) b12 cannot limit records returned and more. (1997) [index] (1997) RSS Feeds; basic info (2005) [isfolder] and [filename] (1997) creator code (1997) WebCat2b12 - nesting [tags] (1997) Narrowing NT Crashing error (2000) I'm new be kind (1997) Help with getting rpm file (2002) auto adding SKUs w/DB helper (1998) &max= (2003)