Page 1 of 2 12 LastLast
Results 1 to 15 of 23

Thread: Batch in icon

  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    batch in icon

    I have file .doc and .xls in myserverdirmydir..... 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.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: batch in icon

    Hi Sal

    Try

    xcopy /e /v /y myserverdirmydir c:mydir

    NOTE

    /E Copies directories and subdirectories, including empty ones.
    /V Verifies each new file.
    /Y Suppresses prompting to confirm you want to overwrite an existing destination file.

    ALSO test this on some test directory before going live
    Jerry

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: batch in icon

    tks jerry...
    Correct this?
    xcopy /e /v /y GCD01F4500DATIPUBBLICAMODULI_GARANZIE C:MODULI GARANZIE
    because no files copied in c:...(?!)

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: batch in icon

    Jerry forgot to specify any files to copy. Try
    <code>
    xcopy /e /v /y GCD01F4500DATIPUBBLICAMODULI_GARANZIE*.* C:MODULI GARANZIE</code>

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: batch in icon

    Hi Hans...
    But stupid qst...
    XCOPY is a resident command in Win2000 or i must install it?

  6. #6
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: batch in icon

    Have you tried it? - it would be the easiest way to find out it is resident!

  7. #7
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: batch in icon

    Remember that if you have a blank in the path, you must surround it with double quotes, so that
    xcopy /e /v /y GCD01F4500DATIPUBBLICAMODULI_GARANZIE*.* C:MODULI GARANZIE
    should be written as
    xcopy /e /v /y GCD01F4500DATIPUBBLICAMODULI_GARANZIE*.* <big>"</big>C:MODULI GARANZIE<big>"</big>

    (I am assuming there is no underline character '_' between MODULI and GARANZIE...)
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  8. #8
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: batch in icon

    hI John....
    Now work... Tks also to Hans and Leitf.
    But now instaed to lunch the copy via "Comman line" is possible to integrate in a batch file?
    Or better way is to incapsuled the batch or comad line...
    Sure not all my user in my farm have the knoledgment to lunch the command via "command Line";-(, sure!!

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: batch in icon

    You can put the XCOPY line in a batch file.

  10. #10
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: batch in icon

    Now solved, finally with this little batch, and call it via icon, fork fine.
    Is possible to integrate the batch file in this mode:
    Before to lunch the commad line show a message:

    "Attention this programm update all files in you dir ecc..."
    "Close all application that use this file"
    Show YES or NO
    if YES got to line command if NO exit from batch
    tks.

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: batch in icon

    You can use something like this:
    <code>
    @ECHO OFF
    ECHO You are about to update files etc.
    ECHO Close all applications that use these files.
    SET /P var=Type S to continue, N to stop.
    IF %var% == N GOTO No
    IF %var% == n GOTO No
    XCOPY ...
    :No</code>

  12. #12
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: batch in icon

    nice!!!!
    Tks for suggestion.
    aaaaahhhh....
    But a friend suggest me to use a .vbs file?????
    Wath you think about?
    Tks.

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: batch in icon

    Yes, that would be possible.

  14. #14
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: batch in icon

    sorry... but only one.
    controll if in c: is present dest dir and if not create it before to copy.
    tks.

  15. #15
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: batch in icon

    Hi John...
    For study i have see on the web...
    An other user insert param after the last option of line copy...
    similar:
    xcopy GCD01F4500DATIPUBBLICAMODULI_GARANZIE*.* "C:MODULI GARANZIE" /e /v /y
    Have the same effect?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •