Windows 10: bat file to remove files older than X days old

Discus and support bat file to remove files older than X days old in Windows 10 Gaming to solve the problem; Would you be able to tell me why I am not able to make this work. Trying to create a bat file Windows 11 to delete files older than 14 day from this... Discussion in 'Windows 10 Gaming' started by Leno#, Jun 1, 2022.

  1. Leno# Win User

    bat file to remove files older than X days old


    Would you be able to tell me why I am not able to make this work. Trying to create a bat file Windows 11 to delete files older than 14 day from this directoryThe error message is below. errorC:\Users\leno0\Desktop>Forfiles -p "C:\Work Data\Len's Files\Data\Quicken\BACKUP\" -s -m *.QDF-backup /D "-14" /C "cmd /c del /q @path"ERROR: Invalid argument/option - '/q'.Type "FORFILES /?" for usage. LenO Be Safe Stay Healthy

    :)
     
    Leno#, Jun 1, 2022
    #1
  2. NinjaNife Win User

    BAT file/Script to find and replace files

    Hey guys. Not sure if this is the correct forum, since this doesn't have to do with HTML or anything, so if it is in the wrong place please let me know (or move it if you can).

    I am looking for a BAT file or script (preferably BAT file) that can find files with a specific name and overwrite them with one example file (located in the same folder as the BAT file). Here is an example of what I mean:

    There are 10 files, all located in different folders in the same tree and its branches. At the top, there is "File_A", and below it are "File_A" copies, but they are older versions (same file name, different data in the file). I need the something that will search all the sub-directories, find all of the copies of "File_A", and replace it with the new version ("File_A" located at the top of the tree).

    Wow, that made a lot more sense before I tried typing it lol. If you have any questions I will do my best to answer them, but I don't have much experience with this stuff.. Any help would be greatly appreciated. Thanks *Smile bat file to remove files older than X days old :)


    Brendan "NinjaNife" West
     
    NinjaNife, Jun 1, 2022
    #2
  3. BAT file/Script to find and replace files

    Hey all....

    Can someone help me make the BAT script in the 2nd post above to be able to use MORE than "1" file?
    As it currently is, you can only replace one particular file.

    For example, I want in the command line to be able to write two files or more, and the script will find and replace all those 2 or more named files.
    Thanks much.

    P.S.... Is there a GUI that does file searching and replacing?
    I've spent hours searching on the net, and the only thing I can find are "text" search/replace and this BAT command, not actual "file" replacing. I find this amazing. *Frown bat file to remove files older than X days old :(
     
    leeuniverse, Jun 1, 2022
    #3
  4. bat file to remove files older than X days old

    .bat file

    First things first: What is the contents of the batch file?

    Second step: What do you see when you run the batch file from a Command Prompt (cmd.exe)?
     
    Frederik Long, Jun 1, 2022
    #4
Thema:

bat file to remove files older than X days old

Loading...
  1. bat file to remove files older than X days old - Similar Threads - bat file remove

  2. files older than my computer

    in Windows 10 Network and Sharing
    files older than my computer: so I was absently searching through my files, just really looking out of boredom, when I found "Install.exe", made by Microsoft Corporation. this isn't too weird by itself, if it weren't for the fact that the file predates both my computer and windows 10 the file is from...
  3. files older than my computer

    in Windows 10 Gaming
    files older than my computer: so I was absently searching through my files, just really looking out of boredom, when I found "Install.exe", made by Microsoft Corporation. this isn't too weird by itself, if it weren't for the fact that the file predates both my computer and windows 10 the file is from...
  4. files older than my computer

    in Windows 10 Software and Apps
    files older than my computer: so I was absently searching through my files, just really looking out of boredom, when I found "Install.exe", made by Microsoft Corporation. this isn't too weird by itself, if it weren't for the fact that the file predates both my computer and windows 10 the file is from...
  5. bat file to remove files older than X days old

    in Windows 10 Software and Apps
    bat file to remove files older than X days old: Would you be able to tell me why I am not able to make this work. Trying to create a bat file Windows 11 to delete files older than 14 day from this directoryThe error message is below. errorC:\Users\leno0\Desktop>Forfiles -p "C:\Work Data\Len's Files\Data\Quicken\BACKUP\"...
  6. Bat file

    in Windows 10 Gaming
    Bat file: I have a bat fileI am improving it bit by bit till I have reached But not i have added a warning to it before a commandI now want to make that line font size Bigger than the others How can I do that ??So here is the Batch file content@ECHO OFF echo...
  7. Bat file

    in Windows 10 Software and Apps
    Bat file: I have a bat fileI am improving it bit by bit till I have reached But not i have added a warning to it before a commandI now want to make that line font size Bigger than the others How can I do that ??So here is the Batch file content@ECHO OFF echo...
  8. .bat files

    in Windows 10 Network and Sharing
    .bat files: So i am trying to make a minecraft server and need to open a .bat file but i keep getting a error saying "This app can not run on this pc" But it worked a month ago i need a solution please....
  9. Bat file

    in Windows 10 Ask Insider
    Bat file: Good morning/evening/night, I wanted to create a batch file or an exe that can change options inside the gui of an application (the application is cisco webex) (if you are familliar with webex i want to change the audio or turn it to music mode witha batch file) but i am...
  10. .bat file

    in Windows 10 Customization
    .bat file: I have .bat file it is not working in my new PC when I double click on it. but it was working in my old PC. could your please support how to associate .bat file in windows 10? Kindly looking for your support and reply in this regards. Thanks.....