Results 1 to 6 of 6

Thread: Anyone with CMD knowledge?

  1. #1
    Gaming Wizard DarkPrince's Avatar
    Join Date
    May 2008
    Location
    Dublin
    Posts
    15,884
    Game IDs
    Experience

    Default Anyone with CMD knowledge?

    Trying to move files from 1 folder to another that are older than 190 days. Using the forfiles command, I've managed to get it to work on directories with no spaces but any directory with spaces doesn't seem to work, is there some sort of trick for this command?

    forfiles /p C:\ArchivedFiles /m *.* /s /d -190 /c "cmd /c move @file C:\Test"

    this command works however

    forfiles /p C:\Archived Files /m *.* /s /d -190 /c "cmd /c move @file C:\Test"

    does not work and returns an error - ERROR: Invalid argument/option - 'Files'
    PSN ID - Ibuki-Lord

    Hidden Content

  2. #2
    Gaming Wizard DarkPrince's Avatar
    Join Date
    May 2008
    Location
    Dublin
    Posts
    15,884
    Game IDs
    Experience

    Default

    Never mind figured it out
    PSN ID - Ibuki-Lord

    Hidden Content

  3. #3
    Gaming Wizard StarBound's Avatar
    Join Date
    Oct 2008
    Posts
    10,579
    Experience

    Default

    I tried something similar with robocopy but what happened was all the first apparently copied over to the drive but you cannot see them and it makes them inaccessable on the copied to location. But also looking for a solution so I can only backup or copy files that are newer than a certain date.

    https://www.computerhope.com/robocopy.htm
    LG OLED 55E6V|Samsung K950
    XboneX - PS4 Pro - Switch - SUPER AWESOME PC
    Hidden Content

  4. #4
    Oupa $eR8Ed's Avatar
    Join Date
    May 2009
    Location
    Kosmosdaal
    Posts
    5,222
    Experience

    Default

    This works

    forfiles /p "C:\test 1" /m *.* /s /d -60 /c "cmd /c move @file C:\Test"

  5. #5
    Oupa $eR8Ed's Avatar
    Join Date
    May 2009
    Location
    Kosmosdaal
    Posts
    5,222
    Experience

    Default

    Quote Originally Posted by DarkPrince View Post
    Never mind figured it out
    oops, guess i am late, is it similar to what i said above?

  6. #6
    Gaming Wizard DarkPrince's Avatar
    Join Date
    May 2008
    Location
    Dublin
    Posts
    15,884
    Game IDs
    Experience

    Default

    Quote Originally Posted by $eR8Ed View Post
    oops, guess i am late, is it similar to what i said above?
    Yup, saw that with files that have spaces then I need to use ""
    PSN ID - Ibuki-Lord

    Hidden Content

  7. Saying Thanks:

    $eR8Ed (November 5th, 2018)  

Posting Permissions

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