topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:00 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - famewolf [ switch to compact view ]

Pages: prev1 [2]
26
I tried to use this program tonight and ran into a few problems..hoping these are minor....

Instead of creating a folder of the show name and copying all episodes to that folder it's creating a folder with BOTH the show name and the episode name...example "Mental - (Manic at the disco)" instead of the folder just being named Mental.  It also tried to move a file currently being written to which resulted in the file being in both the folder AND the root dir but what concerns me more is it moved some of the other files associated with that show.  For each video it also has other files in my example with the same show name and maybe a different extension...I'm not sure what the result will be of having these moved in the middle of a recording.  Can the program attempt to move the *.tp files and only then move the .tp.index etc if that move was successful?  If a move gets an error can it not exist in the folder as well as root dir?

Was all that clear as mud?  While some shows are like Airwolf-2009-06-11-0.tp  some are also like Mental-(Manic at the disco)-2009-06-11-0.tp

27
Thanks..your script will work fine for me...I'm going to continue to play with the command line part though if for nothing more than an exercise to learn about auto hot key scripting.   The command line code should be close as it came from http://www.autohotke...com/docs/Scripts.htm  ...will look into it more.  There really isn't need for source/target since the new folders should always be created under the original dir...at least in my particular scenario.

Script Parameters: The string(s) you want to pass into the script, with each separated from the next by a space. Any parameter that contains spaces should be enclosed in quotation marks. A literal quotation mark may be passed in by preceding it with a backslash (\"). Consequently, any trailing slash in a quoted parameter (such as "C:\My Documents\") is treated as a literal quotation mark (that is, the script would receive the string C:\My Documents"). To remove such quotes, use StringReplace, 1, 1, ",, All

The script sees incoming parameters as the variables %1%, %2%, and so on. In addition, %0% contains the number of parameters passed (0 if none). The following example exits the script when too few parameters are passed to it:

if 0 < 3  ; The left side of a non-expression if-statement is always the name of a variable.
{
    MsgBox This script requires at least 3 incoming parameters but it only received %0%.
    ExitApp
}

If the number of parameters passed into a script varies (perhaps due to the user dragging and dropping a set of files onto a script), the following example can be used to extract them one by one:

Loop, %0%  ; For each parameter:
{
    param := %A_Index%  ; Fetch the contents of the variable whose name is contained in A_Index.
    MsgBox, 4,, Parameter number %A_Index% is %param%.  Continue?
    IfMsgBox, No
        break
}

If the parameters are file names, the following example can be used to convert them to their case-corrected long names (as stored in the file system), including complete/absolute path:

Loop %0%  ; For each parameter (or file dropped onto a script):
{
    GivenPath := %A_Index%  ; Fetch the contents of the variable whose name is contained in A_Index.
    Loop %GivenPath%, 1
        LongPath = %A_LoopFileLongPath%
    MsgBox The case-corrected long path name of file`n%GivenPath%`nis:`n%LongPath%
}

Known limitation: dragging files onto a .ahk script may fail to work properly if 8-dot-3 (short) names have been turned off in an NTFS file system. One work-around is to compile the script then drag the files onto the resulting EXE.


28
Hmm so would this change make it pass the filename in from command line?  The documentation for AHK says the script can be compiled to be a standalone exe.   I only have one directory but other beyondtv users might have multiple ones...with the ability to pass in the directory name they can call the script multiple times via windows scheduler...hmm would I need to remove the single instance parm then?

#singleinstance

if 0 < 1  
{
    MsgBox Directory must be passed after the command.
    ExitApp
}

SPath := %1%

loop, %spath%\*.*,0,0
{
    RegExMatch(a_loopfilename, "P)^(.*)-\d\d\d\d",TmpVar)
    if TmpVar
    {
        NewFold:= substr(a_loopfilename,1,tmpvar-5)
        filecreatedir, %spath%\%newfold%
        filemove, %a_loopfilefullpath%, %spath%\%newfold%
        tmpvar:=0
    }
}


29
Thank you for the script!  How would you handle multiple source/target's?   Just repeat them in the ini?  The ini goes in same dir as the script?  I'm downloading autohotkey which I haven't used previously so will read up on it.  Sorry if I asked something obvious once reading up on AHK.


30
I am requesting a program that given a list of filenames such as:

Airwolf-2009-06-11-0.tp
Airwolf-2009-06-11-0.tp.index.dat
Airwolf-2009-06-11-0.tp.inprogress.xml
Airwolf-2009-06-11-0.tp.timeindex.dat
A-Team-2009-06-11-0.tp
A-Team-2009-06-11-0.tp.chapters.xml
A-Team-2009-06-11-0.tp.index.dat
A-Team-2009-06-11-0.tp.timeindex.dat
A-Team-2009-06-11-1.tp
A-Team-2009-06-11-1.tp.AudioStats.xml
A-Team-2009-06-11-1.tp.index.dat
A-Team-2009-06-11-1.tp.timeindex.dat
A-Team-2009-06-11-1.tp.VideoStats.xml
Knight Rider-2009-06-11-0.tp
Knight Rider-2009-06-11-0.tp.chapters.xml
Knight Rider-2009-06-11-0.tp.index.dat
Knight Rider-2009-06-11-0.tp.timeindex.dat
Rockford Files-2009-06-11-0.tp
Rockford Files-2009-06-11-0.tp.chapters.xml
Rockford Files-2009-06-11-0.tp.index.dat
Rockford Files-2009-06-11-0.tp.timeindex.dat

will create a subfolder for each show (Airwolf, A-Team, Knight Rider, Rockford Files) or use the one that already exists and move each file to the appropriate show.  Ideally I'd like to run this daily from windows task manager at a set time to keep my shows organized.  If a file is open (being written to) the move will probably fail so the program should be able to handle this.   The path to the video folder would be passed on the command line....i.e.  filename.exe G:\Videos

There was a program for beyondtv users that did this but the author has vanished and the program now gives an "index" error of some sort.  Can anyone help us out?  


31
What I'm basically looking for is an app to auto submit my entry to various sweepstakes I run across that allow entry once a day or once a month etc....if you feel that the auto submission is an issue something I could run which would just OPEN all the various sweepstakes pages in the browser for me to submit would still be beneficial.   If you are wanting to enter 20 to 30 a day it gets rather tedious to look up each one every day even with bookmarks.  I use firefox as a browser and do have lastpass which has a form filler option.  Thanks for your time reading this either way.


Pages: prev1 [2]