At my day job I was tasked with migrating several websites and folders from one Windows server to another. The sites have a ton of quirky permissions settings because they are mostly intranet sites. Several have anonymous browsing turned off. As you may or may not know if you just copy them via drag and drop in File Explorer you will lose all of those permissions that took years to refine. Additionally you will lose creation dates, etc.
After some research I determined that Robocopy was what I needed to retain all that valuable cruft information. Unfortunately (or fortunately if you dig command line stuff) Robocopy is a command line tool with quite a few flags. A little more digging revealed there is a GUI for Robocopy which allows you to save scripts, but I decided to roll my own script.
Features:
A simple “config” section in the script where you define the to/from locations
A config option to run attended or unattended (set this in the script)
Logging
Utilization of the following flags (descriptions are verbatim from the Robocopy documentation):
/E – Copies all subdirectories (including empty ones).
/SEC – Copies NTFS security information. (Source and destination volumes must both be NTFS). Equivalent to /COPY:DATS.
/COPY:DATSO – Copies the file information specified by copyflags, which can be any combination of the following : D – file Data. | A – file Attributes | T – file Timestamps. | S – file Security (NTFS ACLs). | O – file Ownership information.
/TEE – Displays output in the console window, in addition to directing it to the log file specified by /LOG or /LOG+.
/NP – Turns off copy progress indicator (% copied). **
/LOG – Redirects output to the specified file, overwriting the file if it already exists.
/B – Copies files in Backup mode (Backup copies are not restartable, but can copy some files that restartable mode cannot). ***
/R:10 – Specifies the number of retries on failed copies. (The default is 1 million.)
/W:30 – Specifies the wait time between retries. (The default is 30 seconds.)
** I liked seeing the progress as it copied, but all those percentages get written to the log file same as the screen.
*** Consider /Z to use restartable mode.
Obviously you could tweak the flags in the script to get a combination more suitable for you.
If this sounds like something you might find useful you can access robocopy-script on Github. I should note that this is my first public repo on Github. Yay.
Just learned an iTunes trick. When using cover art for screensaver you can click covers to play/pause albums. Notice how the controls appear in the photo when you mouse over a cover.
Playing albums using iTunes cover art screen saver
The Raspberry Pi is basically a $25 computer (Model A) or a $35 computer (Model B) meant to encourage children to learn programming by providing an affordable computing platform that can drive all kinds of projects from controlling robots to running a media center on a tv. I am not a hardcore programmer so I bought one to tinker and encourage my inner programming child.
I bought the Model B because it has 512MB Ram, 2 USB ports, and an ethernet port. The model A has 256MB Ram, 1 USB port, and no ethernet port.
So far I have managed three tasks.
I have booted up with a copy of Raspbian “Wheezy”, surfed the internet and installed a mail client.
I have booted up with a copy of Raspbmc, added some music, and took XBMC for a test drive.
I have installed XBMC Commander to my iPhone and controlled my Raspbmc installation by playing music, videos, etc. I had varying degrees of success with this task.
Rather than copy other people’s fine tutorials I am going to provide definitions of the different technologies, as defined at their site(s). Below the definitions are link(s) to the site(s).
Raspberry Pi
What is (a) Raspberry Pi
“The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard.”
“Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware.”
Wheezy is the recommended starting distro. There is also a link below to a distro that uses the MATE desktop environement instead of the LXDE desktop environment that “Wheezy” uses.
“XBMC Commander is a remote control for the iPad especially designed to interact with XBMC, one of the most advanced open source media centers out there.” (There are iPhone and Adroid versions as well)
Launch GUI for configuring Web Connectors:
sudo /Applications/ColdFusion10/cfusion/runtime/bin/wsconfig
RESET CFADMIN PASSWORD:
/Applications/ColdFusion10/cfusion/bin/passwordreset.sh
(Then Enter 1 for changing Admin Password and put in your new super strong password!)
This is just a quick tip I thought I throw out there. We have an application that applies a fade to a .alert class on all its pages. We have 2 pages that need to not fade one particular alert. Here is one way it can be handled.
Add a class of .notfade to the alert that needs to stay put and not fade out: <div class="alert alert-info nofade"></div>
Place the following in $().ready(): $(".alert").not(".notfade")fadeOut(7000);
I have had this issue for a while and it finally made me crazy enough to try to figure it out. It appears that this error occurs when the “RDS Query Viewer” file does not exist in the .rdsTempFiles folder within your project.
On Mac
Open Terminal
Navigate to the directory where your project is located. For example type: cd /Applications/ColdFusion9/wwwroot/YOURPROJECTFOLDER and hit <enter>
If the “.rdsTempFiles” directory does not exist type: mkdir .rdsTempFiles and hit <enter>
If the “RDS Query Viewer” file does not exist type: touch “.rdsTempFiles/RDS Query Viewer” and hit <enter>. BE SURE TO SURROUND THE COMMAND WITH THE DOUBLE QUOTES BECAUSE THE FILE NAME HAS SPACES.
Refresh the “RDS Query Viewer” view. RDS Query View should work now.
On Windows
Open DOS
Navigate to the directory where your project is located. For example type: cd C:\ColdFusion9\wwwroot\YOURPROJECTFOLDER and hit <enter>
If the “.rdsTempFiles” directory does not exist type: mkdir .rdsTempFiles\rdsTempFiles and hit <enter>
If the “RDS Query Viewer” file does not exist type: fsutil file createnew “RDS Query Viewer” 0 and hit <enter>. BE SURE TO SURROUND THE COMMAND WITH THE DOUBLE QUOTES BECAUSE THE FILE NAME HAS SPACES.
Refresh the “RDS Query Viewer” view. RDS Query View should work now.
The solution below is similar, but does not involve accessing .jar files.
Step 1: Locate your version of CFBuilder by selecting “About Adobe ColdFusion Builder 2”. Make a note of the Version and Build numbers. For this post I am on Version: 2.0.0 and Build: 277745 Step 2: Locate the plugin.xml file in the com.adobe.ide.coldfusion.rcp_X.X.X.XXXXXX folder (Notice how X.X.X.XXXXXX corresponds to the Version and Build from Step 1):
com.adobe.ide.coldfusion.rcp_2.0.0.277745 Step 2: Locate the following section: <extension
point="org.eclipse.ui.ide.resourceFilters"> Step 3: Add a block like this for each new filter you want: <filter
pattern="_notes"
selected="true"/> Step 4: Start CFBuilder from the command line. For me on the Mac I execute the following command in Terminal: "/Applications/Adobe ColdFusion Builder 2/CFBuilder.app/Contents/MacOS/CFBuilder" -clean Step 5: Enjoy your new navigator filter(s).