Re: Handle files with a . (dot) as first char.
- From: "ekkehard.horner" <ekkehard.horner@xxxxxxxx>
- Date: Fri, 08 Feb 2008 15:24:20 +0100
Mattias.Sandstrom@xxxxxxxxx schrieb:
Im new to VBscript and cant get my script to handle files with .dot im[...]
trying to make a script that delete
all files older than 29 days except for the file .root but cant seem
to compare or make an IF string to find the file with a .root probably
since windows cant handle those chars, but there must be someway to
handle it?
No need to slander windows! Just check for the first character of
the filename:
Const csDir = ".\renCSV" ' change this
Dim oFS : Set oFS = CreateObject( "Scripting.FileSystemObject" )
Dim oFile
For Each oFile In oFS.GetFolder( csDir ).Files
If "." = Left( oFile.Name, 1 ) Then WScript.Echo oFile.Name
Next
.
- Follow-Ups:
- Re: Handle files with a . (dot) as first char.
- From: Mattias . Sandstrom
- Re: Handle files with a . (dot) as first char.
- From: Mattias . Sandstrom
- Re: Handle files with a . (dot) as first char.
- References:
- Handle files with a . (dot) as first char.
- From: Mattias . Sandstrom
- Handle files with a . (dot) as first char.
- Prev by Date: Handle files with a . (dot) as first char.
- Next by Date: Re: Handle files with a . (dot) as first char.
- Previous by thread: Handle files with a . (dot) as first char.
- Next by thread: Re: Handle files with a . (dot) as first char.
- Index(es):
Relevant Pages
|