Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch help...  (Read 6008 times)

0 Members and 1 Guest are viewing this topic.

foo_addict

    Topic Starter


    Greenhorn

    • Experience: Beginner
    • OS: Other
    Re: Batch help...
    « Reply #15 on: January 16, 2017, 07:00:04 AM »
    Ok so after reading the possible solution I had to have a go with it right now.

    The first code you posted BC_Programmer has allowed me to do exactly what I wanted. I have tweaked it a little to search for a specific file determined when the batch is run, because there are multiple files that exist on both A: and E: that are never changed and so would never need copying. Also, the /y was giving me an invalid switch error (maybe because of the changes I made?). I think this is something to do with a confirmation prompt(?), but I removed it and it worked without the need to confirm overwrite.

    The code I used:
    copydirs.bat
    Code: [Select]
    for %%F in (%1.abc) do checkflp.bat %%F
    checkflp.bat
    Code: [Select]
    for %%D in (A N) do if exist A:\%%D\%1 copy %1 A:\%%D\%1
    Many thanks again for your kind help.