Author |
Message |
BuffetTo #1 / 7
|
 Assign file in DIR to string
Does anyone know how to assign the first file in a directory to a string and then msgbox that file name? Thanks
|
Tue, 11 May 2004 14:28:27 GMT |
|
 |
Frank Ad #2 / 7
|
 Assign file in DIR to string
Dim s As String s = Dir("*.*") Do While s <> "" If Left(s, 1) <> "." And Not (GetAttr(s) And vbDirectory) Then Exit Do End If s = Dir Loop If s <> "" Then MsgBox (s) Quote: >Does anyone know how to assign the first file in a directory to a string and >then msgbox that file name? >Thanks
Regards, Frank
|
Tue, 11 May 2004 15:19:39 GMT |
|
 |
Joe #3 / 7
|
 Assign file in DIR to string
open "...i don't get no respect!" for output as #1 print #1, "no respect!" close #1 Quote: > Dim s As String > s = Dir("*.*") > Do While s <> "" > If Left(s, 1) <> "." And Not (GetAttr(s) And vbDirectory) Then > Exit Do > End If > s = Dir > Loop > If s <> "" Then MsgBox (s)
-- Joe Foster <mailto:jlfoster%40znet.com> On the cans? <http://www.xenu.net/> WARNING: I cannot be held responsible for the above They're coming to because my cats have apparently learned to type. take me away, ha ha!
|
Tue, 11 May 2004 15:58:50 GMT |
|
 |
Frank Ad #4 / 7
|
 Assign file in DIR to string
On Thu, 22 Nov 2001 23:58:50 -0800, "Joe \"Nuke Me Xemu\" Foster" Quote:
>open "...i don't get no respect!" for output as #1 >print #1, "no respect!" >close #1
Whoops, thanks i forgot about idio... um.. users. Old habit syndrome strikes again. That's how we used to test in DOS. :-) Anyone saving a file with "." in the name, especially as a leading character would definitely not get much respect from me. Quote: >> Dim s As String >> s = Dir("*.*") >> Do While s <> "" >> If Left(s, 1) <> "." And Not (GetAttr(s) And vbDirectory) Then >> Exit Do >> End If >> s = Dir >> Loop >> If s <> "" Then MsgBox (s) >-- >Joe Foster <mailto:jlfoster%40znet.com> On the cans? <http://www.xenu.net/> >WARNING: I cannot be held responsible for the above They're coming to >because my cats have apparently learned to type. take me away, ha ha!
Regards, Frank
|
Tue, 11 May 2004 23:52:26 GMT |
|
 |
Joe #5 / 7
|
 Assign file in DIR to string
Quote:
> Whoops, thanks i forgot about idio... um.. users. Old habit > syndrome strikes again. That's how we used to test in DOS. :-) > Anyone saving a file with "." in the name, especially as a leading > character would definitely not get much respect from me.
Anyone, such as the authors of Outlook Express? Volume in drive M is Q36 NTFS Volume Serial Number is 1CFF-CF0D Directory of D:\Home\Joe\Internet Stuff\Outlook Express 11/23/01 02:52p <DIR> . 11/23/01 02:52p <DIR> .. 10/09/01 10:46p 76,500 .dbx 11/17/01 02:32p 731,860 alt.comp.lang.visualbasic.ver.3.dbx 11/17/01 02:32p 0 alt.comp.lang.visualbasic.ver3.dbx 11/17/01 02:32p 207,572 alt.comp.lang.visulabasic.ver3.dbx 11/17/01 02:32p 10,826,080 alt.horror.cthulhu.dbx 10/09/01 10:46p 666,324 alt.lang.basic.dbx 10/09/01 10:46p 142,036 alt.music.elastica.dbx 10/09/01 10:46p 207,572 alt.music.ministry.dbx -- Joe Foster <mailto:jlfoster%40znet.com> On the cans? <http://www.xenu.net/> WARNING: I cannot be held responsible for the above They're coming to because my cats have apparently learned to type. take me away, ha ha!
|
Fri, 21 May 2004 09:58:29 GMT |
|
 |
Frank Ad #6 / 7
|
 Assign file in DIR to string
On Sun, 2 Dec 2001 17:58:29 -0800, "Joe \"Nuke Me Xemu\" Foster" Quote:
>> Whoops, thanks i forgot about idio... um.. users. Old habit >> syndrome strikes again. That's how we used to test in DOS. :-) >> Anyone saving a file with "." in the name, especially as a leading >> character would definitely not get much respect from me. >Anyone, such as the authors of Outlook Express?
ROFL, i rest my case. :-) Regards, Frank
|
Fri, 21 May 2004 10:27:37 GMT |
|
 |
Yaniv Sapi #7 / 7
|
 Assign file in DIR to string
Quote:
> On Sun, 2 Dec 2001 17:58:29 -0800, "Joe \"Nuke Me Xemu\" Foster"
> >> Whoops, thanks i forgot about idio... um.. users. Old habit > >> syndrome strikes again. That's how we used to test in DOS. :-) > >> Anyone saving a file with "." in the name, especially as a leading > >> character would definitely not get much respect from me. > >Anyone, such as the authors of Outlook Express? > ROFL, i rest my case. :-) > Regards, Frank
LOL! Yaniv.
|
Fri, 21 May 2004 14:43:08 GMT |
|
|