Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any simple way to put file names into the text file?
Message
General information
Forum:
Windows
Category:
Computing in general
Miscellaneous
Thread ID:
01285227
Message ID:
01299039
Views:
16
>>>One more question - what is ADDBS function analogue in VB.NET or C# ?
>>>
>>>Thanks in advance.
>>
>>Path.Combine
>
>Thanks a lot.
>
>I have another question. I'm passing the StartDirectory and I have this code:
>
>For Each fi In f
>            If fi.Extension.ToUpper = Ext And fi.LastWriteTime > LastDate Then
>                Counter = Counter + 1
>                If Counter = 1 Then
>                    TargetFileText.Append("Directory: " & d.FullName)
>                End If
>
>                TargetFileText.Append(Counter.ToString & vbTab & fi.Name) ' & vbTab & fi.Length & vbTab & fi.LastWriteTime & vbCrLf)
>            End If
>        Next
>
>Instead of fullname I only want to print the rest of the directory. Should I use Replace method or what to, say, get
>
>I pass c:\Development\...\FCAdmin
>
>c:\Development\...\FCAdmin\Coordinators
>
>I need to only get Coordinators.
>
>Thanks a lot again.


I would use the Substring() method in conjunction with the LastIndexOf() method to extract the last foldername in the path.

Thanks,
Einar
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform