![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Please help with folder search and copy script Hi VBS-Grouü, i have to find a sollution for the following, but i am afraid that this task is too hard for me as a vbs newbie... There is a folder which contains files like "12345678_BlaBla.doc". Or Folder\Subfolder\12345678_BlaBla.doc There is an additional destination folder-structure like this: FolderName1\12345678\serverdocuments.doc FolderName1\45642354\serverdocuments.doc FolderName2\12345678\serverdocuments.doc FolderName3\43233242\serverdocuments.doc What i have to do is to go throu a path (Structure), dake the first 8 letters/numers of the filenames, search for folders with the same name as the 8letters/numbers part of the filename, and copy the file in each folder that matches. Thank you all in advance Kind Regards Thomas |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Please help with folder search and copy script "Thomas Niemann" <niemann.thomas@xxxxxx> wrote in message news:4936696d$0$31343$9b4e6d93@xxxxxx-online.net... Quote: > Hi VBS-Grouü, > > i have to find a sollution for the following, but i am afraid that this > task is too hard for me as a vbs newbie... > > There is a folder which contains files like "12345678_BlaBla.doc". > Or Folder\Subfolder\12345678_BlaBla.doc > > There is an additional destination folder-structure like this: > > FolderName1\12345678\serverdocuments.doc > FolderName1\45642354\serverdocuments.doc > FolderName2\12345678\serverdocuments.doc > FolderName3\43233242\serverdocuments.doc > > What i have to do is to go throu a path (Structure), dake the first 8 > letters/numers of the filenames, search for folders with the same name as > the 8letters/numbers part of the filename, and copy the file in each > folder that matches. > > > Thank you all in advance > > Kind Regards > > Thomas - FolderName1\12345678\serverdocuments.doc - FolderName2\12345678\serverdocuments.doc Are you saying that you wish to copy this file to both folders? What if the file already exists in one or the other target folder? Also: While the name "serverdocuments.doc" is permissible for a folder name, it is rather unusual to give a folder a ".doc" extension. Is this really what you mean? Lastly: Does it matter if your source file resides in "C:\Folder" or in "C:\Folder\Subfolder"? In other words, is the file supposed to be copied to the same target folder, regardless of its source folder? |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Please help with folder search and copy script > The first 8 characters of "12345678_BlaBla.doc" match two folders: Quote: > - FolderName1\12345678\serverdocuments.doc > - FolderName2\12345678\serverdocuments.doc > Are you saying that you wish to copy this file to both folders? What if > the file already exists in one or the other target folder? letters/numbers of the files name. Quote: > Also: While the name "serverdocuments.doc" is permissible for a folder > name, it is rather unusual to give a folder a ".doc" extension. Is this > really what you mean? Quote: > Lastly: Does it matter if your source file resides in "C:\Folder" or in > "C:\Folder\Subfolder"? In other words, is the file supposed to be copied > to the same target folder, regardless of its source folder? there are folders in the destination structure containing the first 8 letters/numbers and copy/move it into it |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Context Menu - Add COPY TO FOLDER and MOVE TO FOLDER | Tutorials | |||
| please help with folder search and copy | VB Script | |||
| Copy User Profile with VBS Script problem | General Discussion | |||
| Re: VB Script Code to get alert when a folder get changed in intranet FTP Folder | VB Script | |||
| Re: Copying CD files to folder, then copy folder to another hard drive, explorer hangs | Vista file management | |||