-
-
Save akpotter/edbe9cb039e5fd0174f881765c1c2a06 to your computer and use it in GitHub Desktop.
This file contains hidden or 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(fileObject.DateLastModified) & Right("0" & Month(fileObject.DateLastModified), 2) & Right("0" & Day(fileObject.DateLastModified), 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