Created
July 24, 2015 07:33
-
-
Save blaues0cke/de3ee8ad9e48de7a137a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set fileSystemObject = CreateObject("Scripting.FileSystemObject") | |
inputFilePathFull = WScript.Arguments(0) | |
Set fileObject = fileSystemObject.GetFile(inputFilePathFull) | |
inputFileName = fileSystemObject.GetFileName(fileObject) | |
inputFilePath = fileSystemObject.GetParentFolderName(fileObject) | |
outputFilePath = inputFilePath & "\" & Year(Date) & Right("0" & Month(Date), 2) & Right("0" & Day(Date), 2) & " - " & inputFileName | |
If fileSystemObject.FileExists(inputFilePathFull) Then | |
fileSystemObject.MoveFile inputFilePathFull, outputFilePath | |
End If | |
Set fileSystemObject = Nothing | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment