View Single Post
Old 08-06-2008   #1 (permalink)
Ryan Rupert


 
 

file copy operations using source file input and script?

we have a text file that contains a full directory listing of a given
drive's folder structure, this text file directory list represents the same
path structure (drive letter, etc.) the OS is able to see ( external USB
drive), I want to use that text file to provide a copy utility (xcopy,
xxcopy, robocopy, ?) with the source folder path for a file copy operation to
execute upon, so the copy utility will perform a copy operation on the first
directory path provided in the text file, then the next and so on recursing
down the list, note that the copy operation will copy only files that are in
a given directory path, no subdirectories, and the destination folders for
the copy operations will maintain the source directory path (source
E:\path1\file1 to destination Q:\path\1\file1)

OPTION A
I know that we could script the operation with say PowerShell and a simple
copy utility but if I can find a copy utility that supports the 'input file'
natively perhaps that will be easier then writing the script

OPTION B
write a script (Powershell script) that will parse the 'input file' and run
the command line copy operation, whatever the copy utility may be (xcopy,
xxcopy, robocopy, ?)

QUESTIONS
1.) does anyone know of a copy utility that natively supports executing
operations using an 'input file' like this

2.) does anyone want to give direction on writing the script, I am liking
the idea of using Windows PowerShell and a GUI front end tool to aid in the
process (PowerGUI, PowerShell Analyser, etc.)
My System SpecsSystem Spec