ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Program to create subfolders and move files for list of shows BY name.

<< < (5/6) > >>

Target:
cool, many thanks

this might sound like a stupid question, but what i know about video isn't worth repeating, so just to confirm there could be files associated with the converted AVI's, eg XXX.AVI.XXX, XXX.AVI.YYY, etc 

famewolf:
cool, many thanks

this might sound like a stupid question, but what i know about video isn't worth repeating, so just to confirm there could be files associated with the converted AVI's, eg XXX.AVI.XXX, XXX.AVI.YYY, etc  
-Target (June 21, 2009, 10:22 PM)
--- End quote ---

Yes there could be and they would need to be moved as well.   How about if you did you loop based on *.avi but when you got to the actual move you did it based on XXX.* or if it's easier the user could specify the masks in the txt file.

Real example:

smb://[email protected]/G/Video/A-Team/A-Team-2009-06-18-0.avi
smb://[email protected]/G/Video/A-Team/A-Team-2009-06-18-0.avi.chapters.xml
smb://[email protected]/G/Video/A-Team/A-Team-2009-06-18-0.csv

Target:
so we're only moving files that don't contain 'TP'?

famewolf:
Well if your using an exclusion then yes but if a tp file exists you don't want to move ANY of it's files either (xxx.*).....cause it hasn't been converted yet and workfiles might exist.

You have the rare possibility that a .avi could be being written to at the time your job runs..if so it's not going to allow you to move the avi.....it's almost as though you want to try to move the avi and check the result....if positive you can move xxx.*......if an error occured you probably want to do some cleanup and remove the copy that might exist in the subfolder....was that clear as mud?

Here's a list of the files currently in the video dir.....

smb://[email protected]/G/Video/Airwolf-2009-06-21-0.tp
smb://[email protected]/G/Video/Airwolf-2009-06-21-0.tp.index.dat
smb://[email protected]/G/Video/Airwolf-2009-06-21-0.tp.timeindex.dat
smb://[email protected]/G/Video/airwolf-2009-06-21-0.xml
smb://[email protected]/G/Video/Hardy Boys_Nancy Drew Mysteries-2009-06-21-0.tp
smb://[email protected]/G/Video/Hardy Boys_Nancy Drew Mysteries-2009-06-21-0.tp.index.dat
smb://[email protected]/G/Video/Hardy Boys_Nancy Drew Mysteries-2009-06-21-0.tp.timeindex.dat
smb://[email protected]/G/Video/hardy boys_nancy drew mysteries-2009-06-21-0.xml
smb://[email protected]/G/Video/Return to Me-2009-06-21-0_cut.xml
smb://[email protected]/G/Video/Return to Me-2009-06-21-0.tp.index.dat
smb://[email protected]/G/Video/Return to Me-2009-06-21-0.tp.timeindex.dat
smb://[email protected]/G/Video/ts0.header.dat
smb://[email protected]/G/Video/ts0.index.dat
smb://[email protected]/G/Video/ts0.timeindex.dat
smb://[email protected]/G/Video/ts1.header.dat
smb://[email protected]/G/Video/ts1.index.dat
smb://[email protected]/G/Video/ts1.timeindex.dat


I show you all the ts0 and ts1 files cause they should never move....the tp's and their support files should be ignored.....you'd be looking for some like these to move:

smb://[email protected]/G/Video/The Listener/The Listener-(A Voice in the Dark)-2009-06-11-0.avi
smb://[email protected]/G/Video/The Listener/The Listener-(A Voice in the Dark)-2009-06-11-0.avi.chapters.xml
smb://[email protected]/G/Video/The Listener/The Listener-(Some Kinda Love)-2009-06-18-0.avi
smb://[email protected]/G/Video/The Listener/The Listener-(Some Kinda Love)-2009-06-18-0.avi.chapters.xml
smb://[email protected]/G/Video/The Listener/The Listener-(Some Kinda Love)-2009-06-18-0.csv
smb://[email protected]/G/Video/The Listener/The Listener-(Some Kinda Love)-2009-06-18-0.log


I'm cutting and pasting across the network so obviously the local paths would be G:\Video\Filename*

I think I've used up my "one hour of coding"....is your brain hurting yet?  ;)

Target:
try this and let me know how it goes


--- ---/*
A DonationCoder coding snack by Target
EpiFile - a TV show filer
dated  - Jun09

moves TV episode files to an appropriately named sub directory

requires a comma separated 'input file' containing the source and base target directories in the format
 'source dir,target dir' or 'd:\temp,d:\temp' (don't include the quotes).  Multiple sources can be
included by adding extra lines eg

d:\temp,d:\temp
d:\temp1,d:\temp
d:\temp2,d:\temp2

questions or feedback should be posted in the forum at -
     https://www.donationcoder.com/forum/index.php?topic=18729.0
*/
#singleinstance
install, epifile.txt, epifile.txt

ifnotexist, epifile.txt
msgbox, INI not found - script will exit
   
Loop, read,epifile.txt
{
    stringsplit, MyPath, A_loopreadline,`,
    loop, %Mypath1%\*.*,0,0
    {
        if a_loopfilename contains .tp ;,000
        {
        }   
        else
        {
            newfold:= regexreplace(a_loopfilename,"-\d\d\d\d\-\d\d-\d\d-.*")
            newfold:= regexreplace(newfold,"- \(.*\)")
            newfold:= regexreplace(newfold," $")
           
            filecreatedir, %Mypath2%\%newfold%
            errorlevel:=0
               
            filemove, %a_loopfilefullpath%, %Mypath2%\%newfold%
            if errorlevel
            {
                if errlist
                    errlist.= "," . a_loopfilefullpath
                else
                    errlist:= a_loopfilefullpath
            }       
            errorlevel:=0
        }
    }
}
fileappend, %mypath1%, %A_YYYY%%a_mm%%A_dd%.error

script will move anything that doesn't contain .TP (this is configurable)

I haven't done anything about locked/in use files - logically this seems more to me an issue of timing.  

Personally I would probably run something like this before the conversion stage.  This would clear out the converted files, and avoid the in use issue completely

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version