Automator folder generation - strange problem - automator

Hoping someone here can shed some light on an issue I've been having with Automator. For work, we needed something to auto-generate folders & sub folders based on answering 2 questions. The first asks for "Job No", and the second asks for "Job name". Whatever the user answers sets 2 variables - one for Job No and the other for "Job name".
This works well. From here I have a shell script which then generates specific folder structures which inherit the Job No ( example - CF1005 ) , using a folder renaming action in Automator. This works quite well, except foe the subfolders.
The initial set of folders are renamed correctly. That is, they have the Job No added to them as a prefix. However it's the sub-folders that's causing the issue. Sometimes one of the subfolders is renamed correctly, other times it's a few folders. See below:
Directories
As you can see, the folders with XX_ as the prefix aren't bring renamed with the Job No. Please note, this isn't always the case. It's hit and miss. The only thing I can think of is timing. I suspect the renaming action is being executed while the folders & subfolders are still being created by the OS?? I'm stumped. I've added some pauses and that seems to give me a higher success rate, but it's not a 100% success rate. Here's a screengrab of my workflow:
Automator Workflow
Can someone here shed some light on what the issue might be? Last note. At present we can't run this app within a box.com folder. It issues us with an error. Not sure if someone here can help with is, but I thought I'd ask.

It seems to me the problem is the Get Selected Finder Items action, which I can't quite see the sense of. Instead, try it this way (beginning with the Pause action):
The Find Finder Items action gathers just the files you need and passes them straight into the rename action (after another short pause).

Related

Jenkins: File Operations Plugin

I just started with using jenkins, and learning a lot.
Installed on windows 7.
One thing i can figure out is about File operations plugin.
I don't know how to set up just simple "copy, paste" from one location to another.
Yea maybe is dumb, but i just cant figure out, try a lot of and always got build break.
What i need to set up for simple test ? like i liked to say, show me a door, i'll figure out rest :)
The include file pattern wants an ANT style filter (relative to your workspace as the root).
Include File Pattern: myWorkspaceSubFolder\*.txt
Target location also assumes the root workspace though I guess you can redirect it to another drive.

Is it okay to name every project "app" in Rails 4?

I don't like the idea of hardcoding brand names in my projects. I get the feeling they might change later, and sometimes I don't even have a name yet. So, can I do rails new app for my every project and just rename the directory? What problems could arise from that?
this could result in some issues
the name of the application has some implications on the internals and using several apps named "app" might have undesired effects and bugs.
for instance, sessions and cookies are named after the app name, so they will all be the same
further more, this have effects on outside sources such as AWS buckets, github repos, and even folder names - it will be pretty hard to figure out what all those /app folders are.
so if the only app you have and are working on is called app - it shouldn't be a problem (besides the name app, which is really lame, and if you are working on it at least call it by greek letters or something..)
if you are going to work on more that one app.. do yourself, your coworkers, your file-system, github, and everything else - name your app.
Also an important side note - how can you have an app and not know what it is about?
and if the name is not suiting anymore.. change it https://github.com/morshedalam/rename
If you rename your project, you must rename it in some files too. (routes.rb, environment.rb, application.rb, ...)
Heroku, for example, let you rename your app any time with apps:rename.

Post-Build Event changes get ignored

I found out, that $ConfigurationName doesnt work on the Post-Build events in VS2010.
It has to be $(Configuration) as far as I've seen.
My problem now: The TFS-Buildserver seems to ignore this change:
If I check in the Change on the Solution and query a Build and open the Log, I still see "ConfigurationName" instead of Development or another Configuration.
Interesting enought, if I navigate trough the folders to the tfs output directory in the BuildsLogs folder, I see the correct value in the Log file, which is: Development
With this value a Batch-File gets called. I inserted a small test to check, which value gets passed:
copy "..\Configure_Development_Server.cmd" %2\Config\%4.txt /Y
%4 should be the Configuration name.
Sadly, in the output I still get a ConfigurationName.txt file, not the wanted Development.txt.
Could you tell me, how I tell the Buildserver to take the new Postbuild event, and not the old one? At the moment, it seems like it's kindahow splitted between the old and the new one.
Thanks in advance and a good start in the new week!
Matthias

How do I set a Notepad++ variable?

Printing code with Notepad++ is very handy because of the syntax-highlighting.
Unfortunately I'm experiencing a problem with printing.
Now at the left top of the page $(FULL_CURRENT_PATH) is printed, which is, D:\cppWorkspace\project1\display\GUI\main.cpp
I don't want the whole path, to the project, to be printed. However it also should not only print the file name.
In this case it should be, display\GUI\main.cpp. (which are packages inside the project and the file itself)
I tried to edit or set a Notepad++ variable, but I couldn't find a way to do this.
Hopefully someone knows how this can be fixed.
Thanks in advance,
Dennis
Unfortunately the variables are fixed, and cannot be "set" - at least as of the current version (6.3.1). They are simple replacements, handled in the expandNppEnvironmentStrs method in RunDlg.cpp
You're welcome to suggest an idea on IdeaTorrent (see the hosted apps menu on the Sourceforge project), or vote a similar idea up if one exists.

Is there a tool that allows to edit related code in single file?

My idea is that it's much easier to edit related code when it sits in single "work" file. E.g. in Rails application when you implementing some functionality you may edit 1 function per file in the following files: integration test, controller test, controller, model, controller helper. So if it would be possible to 1) mark this code fragments 2) automatically collect them in "work" file 3) edit them togather 4) the tool synchronizes (puts back) the changes; it could simplify development process in many cases. Especially if you need to go through many tweek-and-try iterations.
Vim works fine for this. Install the Rails.vim(1) plugin and with the command :AV you can open a vertical split with the accompanied tests/specs, or :RV to open related files like migrations and views (depending on whether you're viewing model or controller). When you're workspace becomes to cluttered, use :only to go back to one file. Splits are the best way to manage multiple related files IMHO. You can even open the same file twice to see two parts of the same file. It's not exactly the same as you are describing, but it comes close.
1: http://rails.vim.tpope.net/
Just open up Vim and open some windows. What's the problem?

Resources