I was figuring out a way to manage my downloaded files from chrome.I want that my pdf file should save in ABC directory, audio file should save in XYZ directory etc.I thought a way to do so through batch file.My batch file will run silently in background and will automatically distribute the downloaded files in required folders according to file type.
For html file type, as it save a directory too which contains a lot of stuff related to that html page.So I have to move both the .html file and associated directory as well.
I wrote a code to do so, but I am facing a problem here.It moves the .html file but not moving its respective directory.On command prompt it shows 1 dir(s) moved but actually directory is not moving.
Here is the code :
@echo off setlocal EnableDelayedExpansion for %%i in (*.html) do ( move "%%~i" HTML set dirName=%%i set dirNameWithoutExtension=!dirName:~0,-5! move %dirNameWithoutExtension% HTML )
Please suggest if any simple way is there to serve the purpose of distributing downloaded files according to file type.