TenOC

On the road -- Full time

Senior Member

Joined: 03/08/2004

View Profile


Good Sam RV Club Member
Offline
|
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
|
wnjj

Cornelius, Oregon

Senior Member

Joined: 01/11/2007

View Profile

Offline
|
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:\’
|
TenOC

On the road -- Full time

Senior Member

Joined: 03/08/2004

View Profile


Good Sam RV Club Member
Offline
|
I found a free software package "File Fisher" that I think will work. Trying it now.
|
1492

Arlington, VA

Moderator

Joined: 04/08/2005

View Profile

|
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'.
This is a Signature test on RV.net forum portal.
|
YC 1

Yuba City Calif./ Auburndale Florida

Senior Member

Joined: 01/11/2005

View Profile


Good Sam RV Club Member
Offline
|
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
2013 Ford Edge toad
Full Timers
|
|
wa8yxm

Davison Michigan (East of Flint)

Senior Member

Joined: 07/04/2006

View Profile

Online
|
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
|