Copy certain files

  • Thread starter Thread starter Alf
  • Start date Start date
A

Alf

hi, I want my staff to copy certain files in my directory.
Let's say only files with extension *.zip will be copied
in my testfile folder. Is it possible? Can anyone give me
an idea on how to achieve this, batchfile maybe.

thanks in advance,

AlF
 
Assuming you have a shared folder named 'testfile' on your
machine, named 'yourmachine' (and it's on and connected to
the network, from a command prompt in the source folder
(or in a batch procedure) ...

copy *.zip \\yourmachine\testfile

or from another folder ...

copy c:\source\folder\*.zip \\yourmachine\testfile

or to copy every one that existed on the source drive ...

xcopy \*.zip \\yourmachine\testfile /s

Type COPY/? and/or XCOPY/? at a command prompt for more
information on the syntax and options.

Tom Lavedas
===========
 
thanks tom. I have a follow up question. What if extension
*.zip will be restricted on my testfile folder. They have
a write permission but cannot put file with *.zip
extension.

thanks
 
They can write files, but not files that have the zip
extension - is that what you mean? If so, then try ...

copy c:\source\folder\*.zip \\yourmachine\testfile\*.piz

Then you will need to rename them after they arrive.

Tom Lavedas
===========
 
Alf said:
hi, I want my staff to copy certain files in my directory.

TO your directory, or FROM your directory?

What directory are you referring to, your "home directory" on the network?
If so, I would advise against opening up NTFS permissions on part of your
home directory, as you might inadvertently expose too much.
Let's say only files with extension *.zip will be copied
in my testfile folder. Is it possible? Can anyone give me
an idea on how to achieve this, batchfile maybe.

set bossfolder={whatever it is}
set myfolder=C:\mine
copy %bossfolder%\*.zip %myfolder%

This assumes that you want them to copy your zip files to their folders. If
you want the copy to go from them to you, just modify the copy command
accordingly.

/Al
 
THANKS AL.
-----Original Message-----

directory.

TO your directory, or FROM your directory?

What directory are you referring to, your "home directory" on the network?
If so, I would advise against opening up NTFS permissions on part of your
home directory, as you might inadvertently expose too much.

set bossfolder={whatever it is}
set myfolder=C:\mine
copy %bossfolder%\*.zip %myfolder%

This assumes that you want them to copy your zip files to their folders. If
you want the copy to go from them to you, just modify the copy command
accordingly.

/Al


.
 
Back
Top