Pre/Post Command Arguments Parsing Error

Discussion in 'Acronis True Image Product Line' started by PelegS, Jan 6, 2009.

Thread Status:
Not open for further replies.
  1. PelegS

    PelegS Registered Member

    Joined:
    Nov 11, 2008
    Posts:
    12
    I am using True Image Home version 11.0 (build 8,101).

    I have a JavaScript that I wish to run before a backup starts. I enter the following in the "Before Backup Process":
    Code:
    Command:            wscript.exe
    Working Directory: F:\SSI\JS Snippets\
    Arguments:          prune.js /folder:"h:\\[COLOR=Blue][B]F Daily Full[/B][/COLOR]" /days:7
    
    The execution fails. However, if I change the Arguments to:
    Code:
    Arguments:          prune.js /folder:"h:\\[B][COLOR=Blue]F_Daily_Full[/COLOR][/B]" /days:7 
    
    it succeeds. Notice the path has underscores instead of blanks. The problem is the blanks in the path in the Arguments.

    I have thoroughly tested my JavaScript and the JavaScript has no problem accepting the path with or without blanks. In fact, it seems that TI never even executes the script because I inserted a debug statement that just prints "hello" as the first executable statement and it never seems to get executed.

    Furthermore, if instead I execute the JavaScript from a batch file called by TI, that also works.

    All fingers seem to be pointing at TI.

    I've checked the manual, and you are silent on the issue. In fact, you don't really say all that much about how to fill in the fields for Pre/Post Commands.

    I've checked the forum, but I didn't find anything there either.

    Still, I could be missing something, and if I am, I'd sure like to know about it.

    Do you folks at Tech Support have any thoughts on this? Any way around the problem? I'll send you the JavaScript if you want to test this yourself.

    And no, don't even suggest upgrading. I don't want to upgrade because 1) I wanna stick with the devil I know 2) I don't think you will or can guarantee that it will work with any another version. I'd rather you look into the problem, and either set me straight or provide a fix to the version I am using.

    Regards,
    Paul S.
     
  2. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello PelegS,

    Thank you for choosing Acronis Disk Backup Software.

    Yes, you are absolutely correct - the algorithm in our program does not recognize space in path, so it must be replaced with underscore.

    We recommend you to check this article in our Knowledge Base for the detailed information about using batch files in our software.

    Thank you.
    --
    Alexander Nikolsky
     
  3. PelegS

    PelegS Registered Member

    Joined:
    Nov 11, 2008
    Posts:
    12
    I understand how to fire off a batch program from TI. It's pretty easy to do. However, one of my goals for the program is to only have one file, that program, and use it for all the tasks I have running. This is accomplished by passing arguments to the program from the TI task. This keeps everything neat and in its proper place. I think it is inelegant and somewhat sloppy to have to use a batch file that merely passes its arguments to another program in order to get a around a bug. What I did was to just rename all of my backup locations so that no spaces appear in the paths. It was a bit of a pain, but it gets around the problem.

    I do wonder at how you managed to get this one wrong. If I had to write that part of the program, I wouldn't do much more than pick up the entire argument string, complete and intact, and not try to do anything else with it but paste it into the command line that will be sent to the DOS box. Indeed, I can't imagine trying to parse or in any other way trying to interpret the argument string because TI can't presume to know anything about its syntax or semantics. It should have been some relatively easy code to write. I can understand getting the hard stuff wrong because, well, it's hard, but I loose confidence when I see problems with easy stuff.

    I think consolidation is not what I would necessarily call easy. It's not the most difficult thing to do, but there is a lot of bookkeeping and file scanning that I think must go on. Since I've had some interest in the process, I've given it some thought. I can see that you have to come up with an alogrithm that doesn't require a lot of extra temporary file space or an excessive amount of file I/O. However, since TIBs must have an internal directory, it seems that the directories of all the TIBs could be scanned once to determine which file is the most recent one in all the TIBs. Then, the most recent file would be extracted from the TIB it is in and merged into the first TIB. When all the files have been merged into the first TIB, then all of the other TIBs could simply be deleted. The only extra file space necessary might be a temporary database of most recent files and the TIB they appear in so each TIB would only have to be scanned one time and the space to extract the file you are merging into the TIB. You never have to scan the first TIB because if a file in the first TIB appears in the temporary database, then it will always be replaced and if it doesn't appear in the first TIB, it must be added to it. The size of the database itself may be able to be optimized and the extraction process sped up by saving the internal pointers in the TIB into the database. You probably want the full path and filename in the database, including the modification date, in order to make it easier to identify the newest version. When a newer version is found, just update the TIB pointers and the modification date. Like I said, a good bit of bookkeeping, but not a terribly difficult algorithm to program.

    Any, that's my 2 cents.

    Thanks for the attention and response.

    Regards,
    Paul Strauss
     
  4. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello Paul,

    Thank you for using Acronis True Image

    Our Development team is working to improve the algorithm. There are several tasks, that can change the entire architecture of the operations. The updates will be available in the future releases.

    Thank you.

    --

    Oleg Lee
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.