cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Move all files with .txt anywhere inside current folder

TenOC
Nomad
Nomad
Windows 10 on laptop

My data hard drive F: is a mess with more than 200 folders plus an unknown number of subfolders. I would like to move all files with .txt extension present anywhere inside the current folder such as "F:\2001" (even in subfolders) to the main F: "root" no folder.

I can then review them and delete the ones I do not need.

In the days of DOS I THINK there was a way. I have tried DOS "move" and "Xmove" commands with no joy.

A software program that would do this would be welcome
Please give me enough troubles, uncertainty, problems, obstacles and STRESS so that I do not become arrogant, proud, and smug in my own abilities, and enough blessings and good times that I realize that someone else is in charge of my life.

Travel Photos
5 REPLIES 5

wa8yxm
Explorer III
Explorer III
Last I knew there was a limit to the number of files in ROOT (C:\)

Id set up a folder Text, then copy into that

Now.. I do not know if your text files are scattered over multiple folders
But for each folder in Dos.
From within the TEXT folder
Copy C:\ the full path to the folder *.txt
Then once you have verified the files copied
Go to the folder and del *.txt

I do not know if you can do it with a recursive command (All folders at once)

In windows
Open two file manager windows
Point one to c:\text

In the other do a search on .txt
Then copy (not sure this will work I really do not like Windoze)
Home was where I park it. but alas the.
2005 Damon Intruder 377 Alas declared a total loss
after a semi "nicked" it. Still have the radios
Kenwood TS-2000, ICOM ID-5100, ID-51A+2, ID-880 REF030C most times

YC_1
Nomad
Nomad
Have you tried using the built in "file explorer"

Open file explorer, go to a folder that may have text, and in the search box type *.txt.

Right click and then up pops a box allowing you to cut, copy, etc.
I would not do a cut and past because it is too risky.
Using Copy and Paste you can build a copy into the root directory as you are attempting.

I would need to play around but with subdirectories you can usually move files up into directories above with ease.
H/R Endeavor 2008
Ford F150 toad >Full Timers
Certified Senior Electronic Technician, Telecommunications Engineer, Telecommunications repair Service Center Owner, Original owner HR 2008

1492
Moderator
Moderator
WIN10 has everything you need to do this built-in.

Start Powershell (right-click Start icon), and use the command:
    PS F:\> Get-ChildItem -Path ".\*.txt" -Recurse | Move-Item -Destination "F:\TextFiles"

This should move all .txt extension files in your F: directory, and all sub-directories to whatever directory (folder) you specify such as 'TextFiles'.

TenOC
Nomad
Nomad
I found a free software package "File Fisher" that I think will work. Trying it now.
Please give me enough troubles, uncertainty, problems, obstacles and STRESS so that I do not become arrogant, proud, and smug in my own abilities, and enough blessings and good times that I realize that someone else is in charge of my life.

Travel Photos

wnjj
Explorer II
Explorer II
How about this (while sitting at F:\)?

move *\*.txt .
move *\*\*.txt .
move *\*\*\*.txt .

Do that to sufficient depth until it doesnโ€™t find any files to move. This is something Iโ€™ve done on Linux but I think โ€˜.โ€™ also works in cmd prompt for the destination. If not, use โ€˜F:\โ€™