|
-
Jul 13th, 2007, 03:43 PM
#1
Thread Starter
PowerPoster
[RESOLVED] batch of copy in icon on desktop....
I have file .doc and .xls in \\myserverdir\mydir\..... and in c:\\mydir\
in this two dir are the same number of file with the same name. in effect i the same dir.
Now i want to create a desktop icon with a a batch DOS or other language to:
copy from dir of server all files and paste this files in c:\mydir... but no show the message "file existis do yoy want to overwrite yes/no..."
Always in this batch or program controll if one of file in c:\mydir is in use from the user and during the copy show message "attention i cannot complete the operation of copy becaus you have a file in use, close it and repeat the operation"
Tath is all.
Tks.
-
Jul 13th, 2007, 06:40 PM
#2
Re: batch of copy in icon on desktop....
Use Copy /? for more information...
-
Jul 13th, 2007, 10:17 PM
#3
Re: batch of copy in icon on desktop....
use xcopy, not copy.
Xcopy contains a switch to continue copy operations even if an error occurs in the current batch operation. ( /c) You will need to use it if you have a problem with locked files.
-
Jul 14th, 2007, 06:03 AM
#4
Thread Starter
PowerPoster
Re: batch of copy in icon on desktop....
tks randem and lord oewell...
I have understand but not uderstant hoe to integrate this commend of copy in a icon;-) sorry.
-
Jul 14th, 2007, 07:21 AM
#5
Re: batch of copy in icon on desktop....
If you want an actual icon, you will need to make a shortcut to the batch file you create. An example is this:
XCOPY "Sourcepath" "Destinationpath" /c /s
where /c = force copy (except the locked file won't be updated)
/s copies subdirectories
put the line similar to this in a text file and give it the .bat extension
put that file on your desktop and it is clickable. However you can't give it a custom icon. You would have to use a shortcut and give that the custom icon.
Also, this isn't exactly the best way to do something like this. Your best option is create a program to do it for you in visual basic. There are plenty of samples available in the forum for copying directories.
-
Jul 16th, 2007, 12:33 PM
#6
Thread Starter
PowerPoster
Re: [RESOLVED] batch of copy in icon on desktop....
Hi Lord Orwell with you have solved all!! tks.
But only one...
Is possible to controll before the copy if the dest dir in c:\ existsis and if not create it before the command of copy in batch line.
Tks.
-
Jul 16th, 2007, 09:43 PM
#7
Re: [RESOLVED] batch of copy in icon on desktop....
Add the /I switch. It makes xcopy understand you are reading a directory, as long as there are at least two files in it. Your other option is adding an if statement in the .bat file. The syntax would be similar to this:
if not exist ".\mydirectory" MD ".\mydirectory"
the above statement in plain english equals this:
If ".\mydirectory" doesn't exist then create (MD stands for make directory) it.
-
Jul 17th, 2007, 01:42 AM
#8
Thread Starter
PowerPoster
Re: [RESOLVED] batch of copy in icon on desktop....
 Originally Posted by Lord Orwell
Add the /I switch. It makes xcopy understand you are reading a directory, as long as there are at least two files in it. Your other option is adding an if statement in the .bat file. The syntax would be similar to this:
the above statement in plain english equals this:
If ".\mydirectory" doesn't exist then create (MD stands for make directory) it.
Hi Lord Orwell...
Tks for all! and tks for patience.
Now all work fine.
Sorry for my english is alf Italian and Napolitan;:-)
I live in Italy (in Napoli)
Virtual Pizza for you.
Sal.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|