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

Main Area and Open Discussion > General Software Discussion

Script to input two variables and use them to perform multiple tasks

<< < (2/3) > >>

4wd:

...

There may be an easier way to do this but I have not found it. (Probably because this works and I have not had much time to experiment with automation)  Due to the precise structure of the Web-Server this is always the layout and this process always works generating a name+date.txt in about 1 second.  But it takes me another 5 minutes of editing with notepad++ to change all the lines of text to be working hyperlinks .-questorfla (January 05, 2014, 04:48 PM)
--- End quote ---

@questorfla: Perhaps it would help to read one of your previous threads?

Command Line special needs for Batch file - Replace/rename/remove in filenames

 ;)

questorfla:
See what happens when you add on a year ever time Christmas goes by?  Post?  What Post?   :'(
Since me and Santa have the same birthday I try to hide mine in the rush so  it won't count.  But.....
Where was I?  :huh:

Thanks for the repost I need to keep better tabs on my  other self. :P 
I did not check in much over the Holly Daze but that one looks like I need to read it again for the first time.

Mr. Shade.  I can do as you say with the pen and paper but it will still look the same I am afraid.  I cold post screenshots of Notepad++ while I repeatedly use the replace function but that is the issue now.  I have to repeatedly replace the same sections of a directory listing in order to convert it to a hyperlink listing.  Instead of c:\websitelocation on the server.  I  need http://"website location on the server" with all the slashes reversed  :-\

I think I better haul out my copy of autohotkey and see how it flies.

questorfla:
Hi Shades. 
I promised to report back on the test run.  Everything was ok until the xcopy command.  For what it is worth, I changed your parameters and it went through,  Not sure which one was the cause,. 
You used the /I/H/Q/R switches which is probably the norm.  I am a bit more "paranoid" (overkill or whatever)  and I usually put half the alphabet.  As in "/s/h/e/r/c/k/y/d/I/f/g"  :)  I know a lot of that is unnecessary but something in my switches must be needed.  The fail seemed to be on copying either subfolders or contents of subfolders since the main files went fine.  Once I got past that the next stop was in the database creation. 
This is just a dummy system so I only left root as the user with no password.  But it still hit an error.  I added a pause statement so I could read it and it was about the system not being able to find the stated file (ie: variable)

Changing the "create"  line for  MySQL to -u root -e "testdb"; works fine.

Also leaving the variable %flaUserNameOK%  for the database name works.   Unfortunately the name of the db needs to be the variable (%flaUserDescriptionOK%).

I thought this would simply be a matter of changing the variable name but for some reason it won't go.  If I leave it creating the Username as you have it, that works although I need to add switches to set the character-set and collation to Latin1_swedish_ci from UTF8.
But it will create the empty database.  I have been reading through the MYSQL manual   (Sorry but that is why this has taken me so long to get back to you)  but everything looks Kosher.  That one variable is the only problem and I can even echo the value of the description variable immediately before the creation of the DB and it is the correct value.  I am obviously missing something since the other variable works fine but I cant use it due to the structure of the server.  The inputted description is what should be used for the database creation.  I think I can handle the addition of the default characterset and default collation after the DBs created if necessary but it looks like it can be done during creation too.

I MUST say that your structured formatting for each process has given me a new way to look at these problems as modules rather than trying to do everything in one chunk.  Much easier to troubleshoot for sure. :Thmbsup:

Any ideas on the variable problem would be appreciated.  The multiple switches I added on the Xcopy command have a lot of unnecessary actions but a couple of them (probably /S/E ) were all I needed to add) to get the contents of the subfolders and files

4wd:
Instead of c:\websitelocation on the server.  I  need http://"website location on the server" with all the slashes reversed  :-\-questorfla (January 05, 2014, 08:52 PM)
--- End quote ---

Which is solved at the above post I mentioned ... no AutoHK required  ;)

questorfla:
Thanks 4W for the pointer to look back at what had already bee answered.  A little bit of this and touch of that and lo and behold the whole thing works!  That was the middle part of the 3 steps.  It fit like a glove.  I might be better off with AHK but it is more fun doing it the old way.  Like back in the COBOL days :).  Anyway, I might post the whole project now that it is finally complete and tested several times.  Works perfectly! :Thmbsup: (I doubt anyone but me would ever need it!)  :huh:

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version