我需要創建大量需要從csv文件創建的目錄和子目錄。我認爲使用批次是最簡單的方法。然而,我不太熟悉批次,所以我正在尋找幫助。使用csv創建批處理目錄/文件夾
下面是CSV的某些部分(有超過800線):
FolderID,FolderName,FolderParentID,OwnerID,TopLevelFolderID
1,My Folder,NULL,1,1
2,My Folder,NULL,2,2
5,Test,NULL,3,5
195,My Folder,NULL,132,195
174,My Folder,NULL,133,174
133,My Folder,NULL,135,133
154,My Folder,NULL,139,154
134,My Folder,NULL,140,134
137,My Folder,NULL,141,137
136,My Folder,NULL,145,136
191,My Folder,NULL,148,191
160,My Folder,NULL,150,160
147,My Folder,NULL,152,147
165,My Folder,NULL,153,165
157,My Folder,NULL,154,157
158,My Folder,NULL,155,158
142,My Folder,NULL,157,142
192,My Folder,NULL,158,192
153,My Folder,NULL,159,153
186,My Folder,NULL,160,186
177,My Folder,NULL,162,177
我通過它認爲,這是基本的結構應該如何:
Create Folder 1 per OwnerID with OwnerID as folder name
"/OwnerID/"
if FolderParentID = NULL and/or is same as TopLevelFolderID, then create folder with FolderID in OwnerID folder.
"/OwnerID/FolderID/"
if FolderParentID = notNULL, and FolderParentID is same as TopLevelFolderID, then create folder with FolderID in FolderParentID
"/OwnerID/FolderParentID/FolderID/"
if FolderParentID = notNULL, adn FolderParentID is not same as TopLevelFolderID, then create folder with FolderID in FolderID form level above
"/OwnerID/FolderParentID/FolderID/FolderID/"
任何幫助將不勝感激,並提前致謝!
格式編輯.. google.com