getting files inside sub folder
-
Hello friends, How to get files inside subfolder. this is the code i used to get files inside a folder, How can i use this code to get the file inside the folder or subfolders. these code wil consider the files inside folder only. sPath1 = "C:\common share\" sFileNm = Dir(sPath1, vbNormal) 'Get the first file from the specified directory For Each sFileNm1 In objFolder1.Files 'If the file has a txt extension then print the file name If Right(sFileNm, 3) = "txt" Then Debug.print sFileNm1 End If sFileNm = Dir Next "C:\common share\ " May or maynot contains subfolder, if present want to check the subfolder also. Can i get the code for these. Thanks and regards Jishith
-
Hello friends, How to get files inside subfolder. this is the code i used to get files inside a folder, How can i use this code to get the file inside the folder or subfolders. these code wil consider the files inside folder only. sPath1 = "C:\common share\" sFileNm = Dir(sPath1, vbNormal) 'Get the first file from the specified directory For Each sFileNm1 In objFolder1.Files 'If the file has a txt extension then print the file name If Right(sFileNm, 3) = "txt" Then Debug.print sFileNm1 End If sFileNm = Dir Next "C:\common share\ " May or maynot contains subfolder, if present want to check the subfolder also. Can i get the code for these. Thanks and regards Jishith