hi dostips expert batch scripters,
my pc FILES are all in a mess, cz long time no move them to proper folder!
how do you write a amazing bat script to organize/move all files type to its folder according to its own file extension??
for example,
c:\mess\*.pdf *.doc *.jpg *.mp3 *.mp4 *.bat *.etc
becomes like below,
c:\document\pdf\*.pdf
c:\document\word\*.doc
c:\pictures\jpg\*.jpg
c:\music\mp3\*.mp3
c:\etc\etc\*.etc
AND one Important thing is Never Rewrite the same filename, if exist same filename1, it will automatically save in filename2...
thanks in advance !!
Automatically Organize Files according to their file types!!
Moderator: DosItHelp
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
Re: Automatically Organize Files according to their file typ
I would do it manually from the command prompt:
cd /d c:\mess
move *.pdf "c:\document\pdf"
move *.doc "c:\document\doc"
It would take you just about as long to write the script file as it would be to just do it. Don't forget to make the directory first if needed:
md "c:\document\pdf"
. . .
cd /d c:\mess
move *.pdf "c:\document\pdf"
move *.doc "c:\document\doc"
It would take you just about as long to write the script file as it would be to just do it. Don't forget to make the directory first if needed:
md "c:\document\pdf"
. . .