Click here to Skip to main content
16,005,141 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralDereferencing in VisualBasic Pin
5-May-01 9:14
suss5-May-01 9:14 
GeneralRe: Dereferencing in VisualBasic Pin
5-May-01 12:33
suss5-May-01 12:33 
GeneralSave date and time to a txt document Pin
3-May-01 9:01
suss3-May-01 9:01 
GeneralRe: Save date and time to a txt document Pin
Konstantin Vasserman5-May-01 7:20
Konstantin Vasserman5-May-01 7:20 
GeneralDetect Application Launch Pin
Ray Brack24-Apr-01 18:21
Ray Brack24-Apr-01 18:21 
GeneralRe: Printer Pin
19-May-01 0:20
suss19-May-01 0:20 
Generalrename file Pin
23-Apr-01 10:00
suss23-Apr-01 10:00 
GeneralRe: rename file Pin
Jason Gerard23-Apr-01 10:21
Jason Gerard23-Apr-01 10:21 
The following code uses the Scripting.FileSystemObject to rename the file specified in strFilePath to the format out mm-dd-yyyy.txt . Ex. for today, the file would be named
04-23-2001.txt
Hope this helps

Dim strFilePath As String
Dim strNewFileName As String
Dim fso As FileSystemObject
Dim file As File

strFilePath = "c:\myText.txt"

strNewFileName = Format(Now(), "mm-dd-yyyy") & ".txt"

Set fso = New FileSystemObject

Set file = fso.GetFile(strFilePath)

file.Name = strNewFileName

Set file = Nothing
Set fso = Nothing


Jason Gerard
MCSD, MCSE
Technology Point International, Inc.
GeneralRe: rename file Pin
23-Apr-01 11:04
suss23-Apr-01 11:04 
GeneralASCII to HTML String Urgent Pin
23-Apr-01 5:10
suss23-Apr-01 5:10 
GeneralRe: ASCII to HTML String Urgent Pin
28-Aug-01 11:34
suss28-Aug-01 11:34 
Generaliiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii Pin
23-Apr-01 4:23
suss23-Apr-01 4:23 
GeneralPassing variable values between forms Pin
17-Apr-01 6:47
suss17-Apr-01 6:47 
GeneralRe: Passing variable values between forms Pin
Jason Gerard17-Apr-01 15:42
Jason Gerard17-Apr-01 15:42 
GeneralRe: Passing variable values between forms Pin
18-Apr-01 6:49
suss18-Apr-01 6:49 
GeneralScanning (Not anti-virun scanning) using VB API Pin
10-Apr-01 20:15
suss10-Apr-01 20:15 
Generalvariable problems Pin
6-Apr-01 10:23
suss6-Apr-01 10:23 
GeneralRe: variable problems Pin
Raveendra Madupu8-Apr-01 22:37
Raveendra Madupu8-Apr-01 22:37 
GeneralRe: variable problems Pin
18-Apr-01 7:05
suss18-Apr-01 7:05 
GeneralRun ExE Pin
Rajat3-Apr-01 2:44
Rajat3-Apr-01 2:44 
GeneralRe: Run ExE Pin
3-May-01 23:48
suss3-May-01 23:48 
GeneralRun ExE Pin
Rajat3-Apr-01 2:44
Rajat3-Apr-01 2:44 
Generalirc bot Pin
Craig2-Apr-01 0:52
Craig2-Apr-01 0:52 
QuestionIs it possible to build mail server in vb? Pin
bishnu pokharel8-Mar-01 1:00
bishnu pokharel8-Mar-01 1:00 
AnswerRe: Is it possible to build mail server in vb? Pin
ganti3-Apr-01 3:48
ganti3-Apr-01 3:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.