Im hoping to find a solution to my problem. I have sabnzbd download files to a directory and I would like it so if I sorted by date it would list in order of when it was downloaded.
I use xbmc to view video files I d/l but if it is an older show it puts it last on the list. Id like to have the newest downloads at the top which is sorted by file date.
Does anyone know how I should solve this?
thanks!
Script to change date to current?
-
- Newbie
- Posts: 9
- Joined: December 7th, 2011, 6:06 pm
Re: Script to change date to current?
xbmc has differnt types of sorting. You should sort on filename in ascending order.
-
- Newbie
- Posts: 9
- Joined: December 7th, 2011, 6:06 pm
Re: Script to change date to current?
Ok after researching more on what my issue was. I need to change the date modified to the date created.
i.e. episode.mkv was downloaded on 1/8/2012 but uploaded to usenet on 1/4/2012. My file in windows shows that the file was modified on 1/4/2012 but created on 1/8/2012.
I would like to be able to change the date modified to whatever is in the date created field.
Xbmx will only allow me to sort by date modified
my dirty fix thought was to have a script rename the file(maybe just adding a 1 to the end)
how can I go about this?
i.e. episode.mkv was downloaded on 1/8/2012 but uploaded to usenet on 1/4/2012. My file in windows shows that the file was modified on 1/4/2012 but created on 1/8/2012.
I would like to be able to change the date modified to whatever is in the date created field.
Xbmx will only allow me to sort by date modified
my dirty fix thought was to have a script rename the file(maybe just adding a 1 to the end)
how can I go about this?
Re: Script to change date to current?
use touch -params "$1"
touch --help tells you more about params. touch -m changes the modified field only, it changes it to time it's touched (time of postprocessing), but you can specify times if you want to.
(well, I hope you run linux or xmbc-live, or else touch is not a function you can use)
touch --help tells you more about params. touch -m changes the modified field only, it changes it to time it's touched (time of postprocessing), but you can specify times if you want to.
(well, I hope you run linux or xmbc-live, or else touch is not a function you can use)
-
- Newbie
- Posts: 9
- Joined: December 7th, 2011, 6:06 pm
Re: Script to change date to current?
Thanks for replying so fast!
I can use this script with windows correct?
Another dumb question(im learning)
I am currently using this script to delete extras - can I just add this line touch -m "$1" to the script?
I can use this script with windows correct?
Another dumb question(im learning)
I am currently using this script to delete extras - can I just add this line touch -m "$1" to the script?
Code: Select all
@echo off
setlocal
echo.
echo [Cleanup] Cleaning up download directory: %1
echo [Cleanup] Deleting .nzb files
DEL %1\*.nzb /S /F /Q
echo [Cleanup] Deleting .sfv files
DEL %1\*.sfv /S /F /Q
echo [Cleanup] Deleting .nfo files
DEL %1\*.nfo /S /F /Q
echo [Cleanup] Deleting .sub files
DEL %1\*.sub /S /F /Q
echo [Cleanup] Deleting .idx files
DEL %1\*.idx /S /F /Q
echo [Cleanup] Deleting .sample files
DEL %1\*sample*.avi /S /F /Q
echo [Cleanup] Deleting .sample files
DEL %1\*sample*.mkv /S /F /Q
echo [Cleanup] Deleting .sample files
DEL %1\*sample*.mp4 /S /F /Q
echo [Cleanup] Deleting .srr files
DEL %1\*.srr /S /F /Q
echo [Cleanup] Deleting .srs files
DEL %1\*.srs /S /F /Q
echo.
Re: Script to change date to current?
I don't know windows commands sorry. Maybe someone else does.
Here is something, but touch doesn't seem to be a native command on windows.
http://superuser.com/questions/10426/wi ... mand-touch
Here is something, but touch doesn't seem to be a native command on windows.
http://superuser.com/questions/10426/wi ... mand-touch
-
- Newbie
- Posts: 9
- Joined: December 7th, 2011, 6:06 pm
Re: Script to change date to current?
thanks but thats way over my head
Lets hope a windows guru can shed some light
thanks again for the help Mar2zz!
Lets hope a windows guru can shed some light
thanks again for the help Mar2zz!