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 there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

xcopy don't do it for me.

  • 24-04-2001 7:30pm
    #1
    Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭


    Here's the deal.

    I have File \dir1\dir2\dir3\dir4\filename.txt

    I want to copy this to dir5 but maintain the same directory structure underneath.

    From what I gather XCopy won't do this (forget about copy). I can get it to generate a path copy but then it goes and copies everything else too.

    The workaround I have is to set the ATTRIB of all the files to -A, then set the ATTRIB of only the files I want to copy to +A then I use XCopy and specify the root to copy and only copy with +A set on files.

    Works but is messy. Is there a proggy which will do this for me? Or do I have to write my own?


Comments

  • Registered Users, Registered Users 2 Posts: 20,099 ✭✭✭✭WhiteWashMan


    write your own and sell it for millions, coz people really want to copy one file in 5 cascading empty directories smile.gif


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    tongue.gif

    well that was just an example. Actually I have 400-500 files in various different subdirectories out of 2000+ that I want to copy, so a proggy to do it would be handy as the attrib method is a bit slow.



  • Registered Users, Registered Users 2 Posts: 20,099 ✭✭✭✭WhiteWashMan


    to be honest id just create the directories and copy and paste.
    or you might be able to use something like winzip to keep the directories structure?


  • Closed Accounts Posts: 1,193 ✭✭✭Kix


    Hobbes, do you have a c compiler? I'll send you some source I wrote which pretty much does this job. There's a few things hard coded into it - like the file extensions to copy - but it should be a piece of pi$$ for you to alter. Just let me know and I'll mail it to you.

    I should also mention that the code uses the Win SDK - does this suit?

    [This message has been edited by Kix (edited 25-04-2001).]


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    I already wrote the proggy. Thanks anyway. Takes a filelist from a file and copys only those files.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 326 ✭✭ConUladh


    Bit of a late resonse but

    Check out this extract from the langalist, only had a quick look but might do what you want (even though you've already done it)

    7) Free XXcopy

    I've previously mentioned the DOS command, Xcopy--- and the freeware DOS
    extension XXcopy (see http://www.langa.com/newsletters/2000/2000-06-
    15.htm#5 ) Basically, Xcopy is a more powerful "copy" command that can
    move entire directory trees in your hard drive all at once. XXcopy is
    even more powerful, with more built-in features.

    If you're a power user, the free XXcopy can be a very handy tool. The
    current version is 2.44.4; if you're using an older version or are new
    to this powerful utility, check out:

    ]http://www.xxcopy.com/xxcopy/index.html


    [This message has been edited by ConUladh (edited 30-04-2001).]


Advertisement