Module: Reorg / Cleanup
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
' ArticleExists(Identifier: String)
|
||||
' ----------------------------------------------------------------------------
|
||||
' Findet Artikelnummer anhand von versch. Kriterien
|
||||
' - Artikel-Nummer, Alternative Artikel-Nummer, EAN-Code, Seriennummer
|
||||
' - Gibt die Zeile im Grid zurück in der Artikel das erste Mal gefunden wurde
|
||||
'
|
||||
' Returns: ArticleExists: Int
|
||||
' ----------------------------------------------------------------------------
|
||||
' Copyright (c) 2021 by Digital Data GmbH
|
||||
'
|
||||
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
' Tel.: 0641/202360 • E-Mail: info-flow(at)digitaldata.works
|
||||
' ----------------------------------------------------------------------------
|
||||
' Creation Date / Author: 02.02.2022 / JJ/MP
|
||||
' Version Date / Editor: 22.03.2022 / JJ/MP
|
||||
' Version Number: 1.0.0.0
|
||||
|
||||
Function CreateDateDirectory(BasePath)
|
||||
Set oFileSys = CreateObject("Scripting.FileSystemObject")
|
||||
NowDate = Date
|
||||
NowYear = Year(NowDate)
|
||||
NowMonth = PadZero(Month(NowDate))
|
||||
NowDay = PadZero(Day(NowDate))
|
||||
|
||||
If Right(BasePath, 1) <> "\" Then
|
||||
BasePath = BasePath & "\"
|
||||
End If
|
||||
|
||||
YearPath = BasePath & NowYear & "\"
|
||||
MonthPath = YearPath & NowMonth & "\"
|
||||
DayPath = MonthPath & NowDay
|
||||
|
||||
If Not oFileSys.FolderExists(YearPath) Then
|
||||
oFileSys.CreateFolder(YearPath)
|
||||
End If
|
||||
|
||||
If Not oFileSys.FolderExists(MonthPath) Then
|
||||
oFileSys.CreateFolder(MonthPath)
|
||||
End If
|
||||
|
||||
If Not oFileSys.FolderExists(DayPath) Then
|
||||
oFileSys.CreateFolder(DayPath)
|
||||
End If
|
||||
|
||||
CreateDateDirectory = DayPath
|
||||
End Function
|
||||
|
||||
Function PadZero(Num)
|
||||
If Len(Num) = 1 Then
|
||||
PadZero = "0" & Num
|
||||
Else
|
||||
PadZero = Num
|
||||
End If
|
||||
End Function
|
||||
|
||||
Function GetRelativDateDirectoryName()
|
||||
GetRelativDateDirectoryName = ""
|
||||
|
||||
NowDate = Date
|
||||
NowYear = Year(NowDate)
|
||||
NowMonth = PadZero(Month(NowDate))
|
||||
NowDay = PadZero(Day(NowDate))
|
||||
|
||||
GetRelativDateDirectoryName = NowYear & "\" & NowMonth & "\" & NowDay
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user