Hello all, I am new to this list and appreciate all of your help.
 
I am trying to write a Windows perl script to move files from Windows
volume A to Windows volume B and keep the directory structure. I tried
to use mkdir but it will only create one directory deep.
 
I am reading a file that contains data like this:
 
\\server\share\dir1\dir2\...\file1.txt 
 
So far I have been successful in opening and reading the file. I also am
passing 3 arguments from the command line which I have captured into
variables (-s source of the data file above, -d destination volume where
is it to be moved to, and -l a log file in which we will capture what
files have been moved.)
 
Here is what I need yet:
 
1.  I need to parse each line in the file for just the directory
structure (I assume split is what I want but I have not addressed this
yet) and get just the \dir1\dir2 so I can recreate it.
2. Create the directory structure on the new volume from the -d cmd line
arg
    2a. If I use mkdir within perl then I need to parse the complete
directory list and then loop through each dir to create it on the -d
volume.
    2b. I could call the DOS MD and pass it the complete variable
structure of the combine -d + parsed dir from the file. I tried some
testing but could not seem to pass the system () any variable data.
3. Then I can use the move within perl to move the file with the
combined -s and -d+ new parsed dir\file from the file.
 
Any help on the above steps would be greatly appreciated. If you need to
see what I have I can send it out but it is not much right now. Thank
you in advance for your help.
Tom Bliss, Principal Consultant
Computer Associates TS, SNIA SCSE
Office Phone:   513-229-2366
e-mail:   [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 


 

Reply via email to