Basically I want to replicate the same function of "Sort by" in Windows, but instead of manually clicking:
right button > Sort by > Modified date
run a script stored in the same folder for which I want to sort folders and files (I don't mind that folders are listed first).
How to Sort current folder by modified date via script/bat.
Re: How to Sort current folder by modified date via script/b
If you mean to go via CLI, this will do it nicely:
- [/size]
Code: Select all
dir /OD /TW
- (meaning Order by Date, use Time of last Write; an optional "/S" might be needed for inclusion of Sub-folders).
Re: How to Sort current folder by modified date via script/b
Thank you Midas!!
I must be doing something wrong...
I created a bat file with the code in a test folder with some files and nothing happened. I manually refreshed the folder without result.
I have been researching in autohotkey forums but it seems the solutions are language dependent.
I must be doing something wrong...
I created a bat file with the code in a test folder with some files and nothing happened. I manually refreshed the folder without result.
I have been researching in autohotkey forums but it seems the solutions are language dependent.
Re: How to Sort current folder by modified date via script/b
Care to share your batch code?
Nothing is supposed to happen here: it just generates a listing of the filesystem objects sorted accordingly.
If you want to capture that listing, you'll have to pipe it into a text file with something like "> output.txt".
Adding an optional "\B" might be called for to do away with the extra info...
Nothing is supposed to happen here: it just generates a listing of the filesystem objects sorted accordingly.
If you want to capture that listing, you'll have to pipe it into a text file with something like "> output.txt".
Adding an optional "\B" might be called for to do away with the extra info...
Re: How to Sort current folder by modified date via script/b
So far what I have found
https://autohotkey.com/board/topic/5579 ... lder-view/
Unfortunately I haven't managed to ge it to work...
I apologize for the late response (had a power outage).
https://autohotkey.com/board/topic/5579 ... lder-view/
Unfortunately I haven't managed to ge it to work...
Rather than a list I'd get explorer to open with a given type of sorting.Midas wrote:Nothing is supposed to happen here: it just generates a listing of the filesystem objects sorted accordingly.
I apologize for the late response (had a power outage).
Re: How to Sort current folder by modified date via script/b
No can do. And, as said previously, I'm outta here...