Batch File Management

Discussion in 'Software' started by UKARMYCADET, Oct 15, 2019.

  1. UKARMYCADET

    UKARMYCADET Corporal

    Hello,

    I have some data with a repeating folder structure. It consists of a folder containing uniquely named folders. In the unique folders is a file thats always named the same but its contents differ.

    However i need the file placing in yet another folder.

    Current structure:
    Parent folder --> unique folder --> File.txt

    New structure:
    Parent folder --> unique folder --> new folder --> File.txt

    The "new folder" is named the same in each instace.

    Is there a way to create the "new folder" inside each unique folder and then move the "File.txt" inside of the "new folder" in a batch move.

    I appreciate any help offered.

    Cheers
     
  2. foogoo

    foogoo Major "foogoo" Geek

    Test this first - not responsible for any mishaps
    In CMD type
    FOR /d %A IN (D:\Parent\*) DO mkdir "%A\NEW" & move "%A\*.*" "%A\NEW"

    https://gph.is/g/4ow3gLJ
     
    UKARMYCADET likes this.
  3. UKARMYCADET

    UKARMYCADET Corporal

    This worked! Thank you its greatly appreciated.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds