Help moving files to different directories

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Smokin
New Member
New Member
Posts: 1
Joined: 2021-04-11, 20:06 UTC

Help moving files to different directories

Post by *Smokin »

Hey guys, hoping someone can help me out here.

I’ve got a bunch of files in one directory, which need to be sorted in to a lot of directories on another drive. I have a .txt file with the location (directory) of each file. So, each files desired new location is written in the file.

Example - Files now:
C:\1.jpg
C:\2.jpg
Etc...

Then I have a .txt file with new locations:
D:\a\1.jpg
D:\b\2.jpg
Etc...

I tried to use the multi-rename tool, by selecting the files, press ctrl+M and loading the file to rename them, but it seems this method cant move files, only rename them in the current directory.

Does anyone have some idea how I could solve this?
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: Help moving files to different directories

Post by *sqa_wizard »

Well, you can move a file by renaming with MRT, but this is restricted to the same drive!
e.g. rename 1.jpg to a\1.jpg will move the file to subfolder a (if it doesn't exist at this time, it will be created).

Moving to a different drive is a "copy and delete" operation which cannot be handled by just renaming.
#5767 Personal license
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Help moving files to different directories

Post by *Stefan2 »

Smokin wrote: 2021-04-11, 20:14 UTC

Hi and welcome!

You could use a DOS-Batch or PowerShell-Script.


Use a good text editor or an spreadsheet tool
and copy your both lists together like
"C:\1.jpg" SpAcE "D:\a\1.jpg"

Next add a copy command like
COPY "C:\1.jpg" "D:\a\1.jpg"

Next you can execute that script.



 
Post Reply