Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back a page or two to re-sync the thread and this will then show latest posts. Thanks, Mike.

help with a batch file

  • 09-12-2005 3:51pm
    #1
    Closed Accounts Posts: 1,691 ✭✭✭


    is anybody good at batch files?
    I'm trying to run something simple.
    Just copy all files of a particular type from 2 network drives onto to my pc.

    This is what i have:

    @ECHO OFF
    cls
    REM move tif files from Z:\network\projects to C:\bmp

    xcopy "z:\projects\*.bmp" "C:\BMP\*.bmp" /S /Y
    xcopy "S:\*.bmp" "C:\BMP\*.bmp" /S /Y


    But this doesn't work, it just fires and nothing gets copied.


Comments

  • Registered Users, Registered Users 2 Posts: 1,477 ✭✭✭azzeretti


    Two things to note.
    1) Can the batch file access these drives by the drive mapping names?
    2) Does the user have access to view/copy these files from the network share?

    Also, not sure you need to specify the destination file type.
    xcopy "z:\projects\*.bmp" "C:\BMP\" /S /Y
    xcopy "S:\*.bmp" "C:\BMP\" /S /Y

    The above SHOULD do - almost certain!


  • Registered Users, Registered Users 2 Posts: 19,396 ✭✭✭✭Karoma


    Essential:
    Check that the commands work manually first: check that you can actually access z: and s: !

    Improvments:
    The destination: "C:\BMP\*.bmp" is unnecesasry -> "C:\BMP\" would suffice.
    You should be checking that the directories and files exist (both source and destination)


  • Closed Accounts Posts: 1,691 ✭✭✭RedPlanet


    Yes i can access both those drives.
    I have full control, not just read-only access.
    There are loads of directories underneath, i presume the batch file will drill down into them.
    Also, i've tested this by placing a .bmp on S:\
    Also confirmed there are tons of bmp's on those drives.

    Unfortunately, the new and improved batch file still doesn't work.
    It just fires and fires and copies nothing.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 92,385 Mod ✭✭✭✭Capt'n Midnight


    BTW: that batch file doesn't move it copies.

    REM till fixed @ECHO OFF
    REM - why ? cls
    REM move tif ( *.bmp ?? ) files from Z:\network\projects to C:\bmp

    xcopy Z:\projects\*.bmp C:\Bmp\*.* /S /C /D /Y

    also lookup ROBOCOPY (a microsoft utility) and RSYNC (linux util with versions ported to windows)


Advertisement