Hope someone can help me. I'm using ASP and VBScript to import a text file. The original format of the file is this: yyyymmddflatnc3 .txt. During the import can I automatically rename the file so that it is in this format mmddyy? And if yes, how do you do it? Any help would be appreciated.
Renaming a file in ASP
Collapse
X
-
Tags: None
-
Hi there,Originally posted by Anthony1312002Hope someone can help me. I'm using ASP and VBScript to import a text file. The original format of the file is this: yyyymmddflatnc3 .txt. During the import can I automatically rename the file so that it is in this format mmddyy? And if yes, how do you do it? Any help would be appreciated.
Yes, it's possible, you need to make use of File Systems Objects (FSO), kindly refer below sample code segment, hope it helps. Good luck & take care.
Code:Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.MoveFile "C:\FSO\ScriptLog.txt" , "C:\FSO\BackupLog.txt"
Comment