PC Review


Reply
Thread Tools Rate Thread

Coping one 1 file with wildcard with Robocopy

 
 
=?Utf-8?B?am9obmM=?=
Guest
Posts: n/a
 
      15th Jun 2004
Hi,

I would like to copy only one file with robocopy using the wildcard .* , I have a file that will be updated that starts with file name 4xxx (the xxx are numbers that will be changed daily but 4 is the always the same) for ex: 4xxx.exe I try to copy only this file with the command for example: robocopy c:\4*.* d:\4*.*

this doesnt work as robocopy looks for the directory 4*.*
This is only a simple example as I need to know how to use the wildcard for a single file with robocoopy
 
Reply With Quote
 
 
 
 
Matthias Tacke
Guest
Posts: n/a
 
      15th Jun 2004
"=?Utf-8?B?am9obmM=?=" wrote:

>Hi,
>
>I would like to copy only one file with robocopy using the wildcard .*
>, I have a file that will be updated that starts with file name 4xxx
>(the xxx are numbers that will be changed daily but 4 is the always
>the same) for ex: 4xxx.exe I try to copy only this file with the
>command for example: robocopy c:\4*.* d:\4*.* this doesnt work as
>robocopy looks for the directory 4*.* This is only a simple example as
>I need to know how to use the wildcard for a single file with robocoopy


Strip the file name from the destination, and ifg it has the extension
exe why don't you use it. Always as unambigous as posssible and ambigous
as necessary.

robocopy c:\4*.exe d:\
or
robocopy c:\4???.exe d:\

HTH
--
Greetings
Matthias________________________________________
For help on nt commands enter in a cmd window:
W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm
 
Reply With Quote
 
Garry Deane
Guest
Posts: n/a
 
      16th Jun 2004
On Tue, 15 Jun 2004 02:17:01 -0700, "johnc"
<(E-Mail Removed)> wrote:

>Hi,
>
> I would like to copy only one file with robocopy using the
> wildcard .* , I have a file that will be updated that starts
> with file name 4xxx (the xxx are numbers that will be
> changed daily but 4 is the always the same) for ex: 4xxx.exe
> I try to copy only this file with the command for example:
> robocopy c:\4*.* d:\4*.*
>
>this doesnt work as robocopy looks for the directory 4*.*
>This is only a simple example as I need to know how to
> use the wildcard for a single file with robocoopy


See Robocopy /?

Usage : ROBOCOPY source destination [file [file]...] [options]

robocopy c:\ d:\ 4*

Garry

 
Reply With Quote
 
Michael Bednarek
Guest
Posts: n/a
 
      16th Jun 2004
On Tue, 15 Jun 2004 02:17:01 -0700, "johnc"
<(E-Mail Removed)> wrote in
microsoft.public.win2000.cmdprompt.admin:

>I would like to copy only one file with robocopy using the wildcard .* , I have a file that will be updated that starts with file name 4xxx (the xxx are numbers that will be changed daily but 4 is the always the same) for ex: 4xxx.exe I try to copy only this file with the command for example: robocopy c:\4*.* d:\4*.*
>
>this doesnt work as robocopy looks for the directory 4*.*
>This is only a simple example as I need to know how to use the wildcard for a single file with robocoopy

[Please don't create lines longer than ~72 characters]

ROBOCOPY requires source and target _directories_ on the command line,
and separate optional file specifications. See ROBOCOPY.DOC or ROBOCOPY
/?
Thus:
ROBOCOPY c: d: 4???.exe

Note that ROBOCOPY requires that the source and target paths must not be
terminated with a back-slash. I recommend reviewing the location of
4???.exe in the root direectory: not good practice.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
coping file from a remote file share - FILE IS NO LONG THERE bogus error message Heith Windows Vista Networking 0 18th Oct 2007 09:58 PM
RoboCopy for one file Mark Elsen Microsoft Windows 2000 4 11th Aug 2004 10:47 PM
ROBOCOPY: How to use HTTP for file replication with Robocopy.exe Abhishek Sharma Microsoft Windows 2000 CMD Promt 11 10th Oct 2003 03:48 PM
ROBOCOPY: How to use HTTP for file replication with Robocopy.exe Abhishek Sharma Microsoft Windows 2000 File System 3 10th Oct 2003 03:48 PM
Coping files with RoBOCopy Pat Microsoft Windows 2000 CMD Promt 1 29th Sep 2003 02:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:04 AM.