Page 1 of 1 1
Topic Options
#184509 - 2008-01-10 06:02 PM special copyjob
Jwilde Offline
Lurker

Registered: 2007-12-09
Posts: 2
hello,

i need to copy 2 subfolders which are in all the subfolders. lets call them FolderA and FolderB. they are located in a structure like this:

\\server\share$\Companyname\projectname\FolderA
\\server\share$\Companyname\projectname\FolderB

There are a lot of company names which contain loads of project names which contain the FolderA and FolderB

i need to copy FolderA and FolderB to a new location. Lets say :

\\server\diverentshare$\FolderA
\\server\diverentshare$\FolderB

is there an option how i can copy the folders? cause robocopy and other don't accept \\server\share$\*\*\FolderA

thanks in advance,

Jeroen.

Top
#184511 - 2008-01-10 07:03 PM Re: special copyjob [Re: Jwilde]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
You could use a UDF like DirList or DirPlus to locate each of the source folders. These UDFs would return an array of file/folder names. You would scan the array for matching folders, which would be the source path. Then you could use a call to RoboCopy with specific source and destination paths. You know what you're looking for, so - when you find \\server\share\\CompanyName\ProjectName\FolderA (looking for FolderA at the end of the path), you'd copy that to \\server\differentshare\FolderA.

You'd need to call (shell) to RoboCopy for each source folder that you found in your scan.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#184533 - 2008-01-12 11:25 AM Re: special copyjob [Re: Glenn Barnas]
Jwilde Offline
Lurker

Registered: 2007-12-09
Posts: 2
Could you give an example how i can scan the array? what is the correct command for the scan action?
i allready have the dirplus and shell section working. just need to know how i can scan the output of DirPlus on FolderA and if so copy the containing files of folderA (with the whole path) to $source..
tnx.


Edited by Jwilde (2008-01-12 11:26 AM)

Top
#184535 - 2008-01-12 01:13 PM Re: special copyjob [Re: Jwilde]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: Jwilde
Could you give an example how i can scan the array? what is the correct command for the scan action?
....


You might to take a look at the Ascan() function. It's on page 53 and 54 of the 4.60 manual.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1283 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.123 seconds in which 0.096 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org