#47502 - 2003-10-31 12:09 AM
copy /s create empty directory strucutre at dest
|
Kyle
Fresh Scripter
Registered: 2000-05-30
Posts: 9
Loc: Irvine,CA USA
|
[Moderator (Sealeopard): Moved thread from 'Scripts' to 'styarters' forum due to lack of script in body]
Can anyone tell me why this code
copy "c:\*.txt" "h:\" /s (h: is a mapped network drive)
recreates my entire directory from C:\ on H:\?
I have a script that loops through a text file looking for specific extensions and when found copies them to the server. Everything works great except when the script complete I have a HUGE tree on the h:\ drive. The files I wanted to copy are there but also the entire tree (no files, only directories) from drive C:\.
Any ideas? [ 31. October 2003, 14:58: Message edited by: sealeopard ]
_________________________
Kyle Shaver, MCSE
[url=mailto:kyleshaver@cox.net]kyleshaver@cox.net[/url]
|
|
Top
|
|
|
|
#47503 - 2003-10-31 12:11 AM
Re: copy /s create empty directory strucutre at dest
|
Kyle
Fresh Scripter
Registered: 2000-05-30
Posts: 9
Loc: Irvine,CA USA
|
Oops! Just saw that my profile had an old email address... kyleshaver@cox.net is current.
_________________________
Kyle Shaver, MCSE
[url=mailto:kyleshaver@cox.net]kyleshaver@cox.net[/url]
|
|
Top
|
|
|
|
#47505 - 2003-10-31 01:16 AM
Re: copy /s create empty directory strucutre at dest
|
Kyle
Fresh Scripter
Registered: 2000-05-30
Posts: 9
Loc: Irvine,CA USA
|
Yeah I saw that in the docs. Let me see if I can explain myself better. Let's say I've got some files in these directories
C:\Tools C:\Kix
My routine says to only copy *.KIX files. I get h:\Tools and H:\Kix will all my .KIX files but I also get
H:\Windows ..\.. and all subdirs H:\Program Files ..\.. and all subdirs
H:\Documents and Settings ..\.. and all subdirs
... and these directories don't contain any .KIX files. My question is how can search all directories on my local drive and only copy files with the extension i want without recreating the entire tree on the destination.
Thanks.
_________________________
Kyle Shaver, MCSE
[url=mailto:kyleshaver@cox.net]kyleshaver@cox.net[/url]
|
|
Top
|
|
|
|
#47508 - 2003-10-31 02:03 PM
Re: copy /s create empty directory strucutre at dest
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
We need to be careful when recommending a "Free" Utility. XXCOPY is "Free" when used in a personal environment>
quote:
You install the XXCOPY program on a computer that is your own personal property and you are the primary user of the computer.
If you transfer files between networked computers using XXCOPY, all of the computers are also your own personal property.
Or, even if the above conditions are not met, you may still use XXCOPY for 60 days for evaluation purposes without charge.
If you want to purchase a license - http://www.xxcopy.com/#order
Otherwise, you can use ROBOCOPY.
HTH,
Kent
|
|
Top
|
|
|
|
#47509 - 2003-10-31 02:14 PM
Re: copy /s create empty directory strucutre at dest
|
Breaker
Hey THIS is FUN
   
Registered: 2001-06-15
Posts: 268
Loc: Yorkshire, England
|
Kent,
You're absolutely right. However, this smacks to me of a one-off job, in which case the evaluation licence terms should be more than adequate for the task.
You may have missed my additional post, pointing out that xcopy will do the job too, and doesn't even require the reskit.
However, I'm not sure I've actually made a "recommendation" here - merely pointed out that the tool is an option, and that from the quick glance I had at its capabilities, it seems impressive.
Its really up to Kyle whether or not he chooses to consider my suggestion (oh, all right, my recommendation) and subsequently, also up to him to pay attention to the details of the "freeware" licence.
Sorry, that was a bit serious - just felt a little like I was getting my wrist slapped for making a suggestion. You are right, though.
Breaker
_________________________
================================================ Breaker
|
|
Top
|
|
|
|
#47511 - 2003-10-31 06:18 PM
Re: copy /s create empty directory strucutre at dest
|
Kyle
Fresh Scripter
Registered: 2000-05-30
Posts: 9
Loc: Irvine,CA USA
|
OK, I guess I need to explain a bit more. I have about 200 clients using anywhere from Win9x to XP. I originally wanted to use robocopy but it won't work on Win9x. I looked into xxcopy but I don't want to put it on all my clients (haven't tried running it from the server). In a nutshell here's what I need to do
Enumerate all local drives Scan all folders for certain files (*.nsf, desktop?.??k, etc.... Mainly Lotus Notes files) If the file <= 300Mb copy it to the server otherwise skip the copy but create a log file somewhere saying the file was skipped
I want to run this during the logon process to make sure everyone gets their files backed up. The ultimate goal is that everyone is getting a new machine. Users are going to be responsible for copying their own documents but I'm responsible for grabbing all their Lotus Notes database, config files, address books, etc.)
Hopefully that clarifies things a bit.
Any ideas are appreciated.
_________________________
Kyle Shaver, MCSE
[url=mailto:kyleshaver@cox.net]kyleshaver@cox.net[/url]
|
|
Top
|
|
|
|
#47513 - 2003-10-31 09:38 PM
Re: copy /s create empty directory strucutre at dest
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
How about roaming vs. local profiles? This way, when you logoff your info is stored/updated on a central server.
Kent
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 837 anonymous users online.
|
|
|