Im looking to create some code in VB that i need to take a file from a main folder and have it automatically copy this file into all subsequent folders. any ideas?
i know what root folder that the file is in. Its just that there are subsequent folders under the main folder that i need the file copied into. here is what i tried in a .bat file but didnt quite work:
@echo off
rem Copy File.txt to Folder 000-999
for %%a in (0 1 2 3 4 5 6 7 8 9) do for %%b in (0 1 2 3 4 5 6 7 8 9) do for %%c in
You need to investigate FileSystemObject (FSO). It will allow you to loop thru subfolders in given folder, then you can use FileCopy or its way of copy a file.
cool i appreciate the advice....one last thing however. is it possible to have code that can search and tell me what all is in a folder. so if i searched for my main folder to exist, i then would need a list of names for the subsequent folders
.. Or use the DIR command (details on several threads in this forum, or in your VBHelp)
___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?' Drive a Steam Roller Steam Engine Prints
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.