1.

Solve : eliminating a useless hierarchy in my folder?

Answer»

Hi

I have saved data from a formatted disk, and the program I used has put all the files in 1334 subfolders in a folder named "lostfiles"
I would LIKE to be able to sort these files usefully by type in order to do a clean recovery.
The first step is to eliminate the subfolders.
Basically, I'd like to copy the files in E:\savedDisk\lostfiles\DIRx with x INCLUDED in [0, 1334] into a folder such as E:\myFiles
I could then simply use windows to sort by type and cut paste my files.

I am no good at DOS

but would have started SMTHG like this
FOR %%F IN ("./*") DO
COPY ...

ok, who's good at this, thanks for your kind help

Assuming none of the file names in any of the directories would be duplicates of each other, you could try pasting the following into a batch file:
for /l %%a in (0,1,1334) do echo xcopy E:\savedDisk\lostfiles\DIR%%a\*.* E:\myFiles\ /SHEY GuruGAry

Great Job ! Thanks for your help !
Except of course, I removed "echo" whenI actually executed.
An I added /Y, beacause the overwrite confirmations were getting boring...

The command I used

for /l %%a in (0,1,1334) do xcopy E:\savedDisk\lostfiles\DIR%%a\*.* E:\myFiles\ /s /Y

cheers Ah, YES - the echo. Sorry, I forgot to remove that from my test.



Discussion

No Comment Found