; 2014 | Michael Ian Lapsley

Grounding Practices Link

I have always had issues with understanding the best practices for grounding in electronics. I found a good reference for grounding practices:

http://www.ese.upenn.edu/detkin/instruments/misctutorials/Ground/grd.html


Adding pdf to Google site

It is difficult to properly display a pdf on a google site. The best solution I have found is using a file cabinet and linking to the pdf directly. Then the browser will open it. This was the only way to view a pdf on my site, on a browser.
  1. Create a file cabinet page:
  2. New page, file cabinet template.
  3. Load the pdfs to be displayed on the file cabinet page. 
  4. The url to display a pdf that is loaded on the file cabinet is this: 
  5. https://sites.google.com/site/yousitename/yourfilecabinetpage/yourpdfname.pdf 
  6. Spaces Cannot be used in the name for the pdf
  7. Place a link to the url wherever you would like users to be able to open the pdf. 
  8. I like to put links in the top ribbon 

Creating Octave standalone distributable for the focus checking program.

Followed this process: http://stackoverflow.com/questions/3843522/how-do-i-create-a-simple-octave-distributable-without-installing-octave (I did not need the change to file_in_path.m)
  • Created embedded.cc and modified it for my particular m file
  • Ran embedded.cc to create embedded.exe
mkoctfile --link-stand-alone embedded.cc -o embedded
  • Created an executable folder to contain all of the supporting files
  • Copied embedded.exe into the folder
  • Opened embedded.exe using cmd to start the whackamole process.
Wackamole process:
  • Copied all dll files from C:\Octave\Octave3.6.4_gcc4.6.2\bin
  • Coped each file that caused the exe to fail
  • In several cases, the functions actually produced errors and it was necessary to investigate the code to determine the needed file.
  • I got stuck on this error:
error: imread: invalid image file: could not find library or dependents: C:\Octave\Projects\FocusCheck\ExecutableFolder\__magick_read__.oct
error: called from:
error:   C:\Octave\Projects\FocusCheck\ExecutableFolder\imread.m at line 74, column 7
error:   C:\Octave\Projects\FocusCheck\ExecutableFolder\FocusCheck_V16.m at line 32, column 5

I have renamed the executable FocusCheck_V16.exe  and its folder FocusCheck_V16exe. The zipped folder can be downloaded here:

Installing Ubuntu on an old computer (Wireless issue)

Installing Ubuntu

I tried to install the newest version of Ubuntu on an old Dell Inspiron 2200. (more than 10 years old) I kept getting this error:

This kernel requires the following features not present on the CPU:
pae

Unable to boot - please use a kernel appropriate for your CPU.

Goggle took me here:

http://askubuntu.com/questions/117744/how-can-i-install-on-a-non-pae-cpu-error-kernel-requires-features-not-present

But I still kept screwing up. I needed to install Ubuntu 11.10 or Lubuntu 12.40. However, it was difficult to find the old-releases page for each. Here are the direct links (hopefully they will not move.):

http://cdimages.ubuntu.com/lubuntu/releases/precise/release/

http://old-releases.ubuntu.com/releases/oneiric/

I download ubuntu 11.10 and burn the iso to a standard 700 mb CD. This installed on the machine without issues. I check the box to download and install updates during the install.

Upon restarting and loading ubuntu 11.10, the system displayed a window indicating it needed updated and the wizard automatically walked me through the updating process. Some thing odd... the touchpad stopped working at some point. I was able to navigate the wizard with the arrow keys. The update took a long time ~ 4 hours. After restarting, ubuntu 12.04 was setup on the system. Opening apps on the side bar was quite slow. The computer only has 400 mb of ram. I might consider using lubuntu if I cannot speed this up.

I got ubuntu to run much much faster using the fallback package to restore the original desktop. I run it with no animation. Runs very nice! See here:

http://www.liberiangeek.net/2011/08/return-to-ubuntu-classic-desktop-in-ubuntu-11-10/
sudo apt-get install gnome-session-fallback

Wireless Issue (Resolved!!)

Summary:

I have tried fixes from ubuntu forums to get my wireless to work with my Broadcom wireless card.

For a while, nothing seem to be working. Ubuntu recognized the card and could "see" all of the available wireless routers. However, it still never connected to the wireless.

Finally, to removed the WEP security on the router and Ubuntu could connect. Hooray! The problem now is how to have security and connect with ubuntu. :(

The issue was in my security settings. I made some changes and it works fine now.

If you are having a wireless issue with ubuntu, turn off your security until it is resolved. This will remove this as a possible complication. Or you can just be smarter than me and realize that if the wireless card can see all of the available routers, it is not a problem with the card. :)

Compressed solution (now that I have been educated)

I did this before tring the solution based on this (http://ubuntuforums.org/showthread.php?t=1997880):
sudo apt-get install linux-firmware-nonfree
The solution here was the most concise: https://help.ubuntu.com/community/BroadcomSTA%28Wireless%29

(also located here: http://ubuntuforums.org/showthread.php?t=1748245&page=5&p=10796508#post10796508)

This will show you how to determine which card you have and the solution for that card.

My card was  broadcom 14e4:4319 / 14e4:4320, so I used the b43 driver.

  sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source
  sudo apt-get install b43-fwcutter firmware-b43-installer

My full path to a solution:

Issue: The wireless does not work. The computer has an external wireless card. It says Dell wireless card 1350 on it but I have read that these are manufactured by broadcom.

After a google search, I found this:

http://ubuntuforums.org/showthread.php?t=1997880

Where the following solution via terminal was suggested:

sudo apt-get remove --purge bcmwl-kernel-source
sudo apt-get install linux-firmware-nonfree
I typed these commands into the terminal.

Immediately after the terminal finished, the lights on the wireless card came on.

(Later I discovered that my card was working at this point. My remaining issue was wifi security settings.)

However, I could not connect to the router. I noticed I thinks my wireless card is Broadcom bcm4306 802.11b/g or bcm4318. But the card said Dell Wireless 1350.

I found this:

http://ubuntuforums.org/showthread.php?t=1695103

Then I typed:

lspci

The output indicated the card was bcm4306 / bcm4318

Then I found this:

http://ubuntuforums.org/showthread.php?t=1869293

Which indicated that I need the b43 driver so I typed:

sudo apt-get install firmware-b43-installer b43-fwcutter

I restarted the computer and it still would not connect.

I tried removing some of the first things I did but it did not work. Also the two links indicate I need bcm4306 so that should be correct.

I went to system settings and ran check for additional drivers. It found one:

Broadcom STA wireless driver

I told it to activate and it downloaded and installed the driver. It was about 3/4 done and the screen when to a full screen terminal like interface.


It seemed to be frozen so I cut power to the computer and reloaded. I clicked on the networking icon at the top of the desktop and there was no mention of wireless at all. :(

In system settings, I search for additional drivers. It idicated the Broadcom STA wireless driver was installed and gave me the option to remove.

I repeated the following:

sudo apt-get remove --purge bcmwl-kernel-source
sudo apt-get install linux-firmware-nonfree
The lights on the wireless card remained off.

I opened system settings and clicked on additional drivers. It showed the STA driver as inactive and gave the option to activate.

I did nothting and restarted.

After the restart, the lights of the wireless card were back on.

I tried another card I have: Dynex ...

I did:
lspci -v

This indicted a slightly different card. So the OS is recognizing the card switch. But it still acts like the other card. Tries to connect but cannot connect.

found this:

http://askubuntu.com/questions/55868/how-to-install-broadcom-wireless-drivers-bcm43xx

but it did not work.

did this:

sudo apt-get remove linux-firmware-nonfree
restarted in text only mode!!! restarted twice, back in gui. Did this:
sudo apt-get install linux-firmware-nonfree 
No Help
________________
Tried This:

https://help.ubuntu.com/community/BroadcomSTA%28Wireless%29

Terminal Output:

mike@mike-Inspiron-2200:~$ lspci -vvnn | grep 14e4 02:03.0 Network controller [0280]: Broadcom Corporation BCM4318 [AirForce 54g] 802.11a/b/g PCI Express Transceiver [14e4:4319] (rev 02) 03:00.0 Network controller [0280]: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller [14e4:4320] (rev 03)

mike@mike-Inspiron-2200:~$ sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source

[sudo] password for mike:

Reading package lists... Done
Building dependency tree Reading state information... Done
Package broadcom-sta-common is not installed, so not removed
Package broadcom-sta-source is not installed, so not removed
Package bcmwl-kernel-source is not installed, so not removed

The following packages were automatically installed and are no longer required: language-pack-kde-en language-pack-kde-en-base kde-l10n-engb dkms Use 'apt-get autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.


mike@mike-Inspiron-2200:~$ sudo apt-get install b43-fwcutter firmware-b43-installer

Reading package lists... Done
Building dependency tree Reading state information... Done

b43-fwcutter is already the newest version.
firmware-b43-installer is already the newest version.

The following packages were automatically installed and are no longer required: language-pack-kde-en language-pack-kde-en-base kde-l10n-engb dkms Use 'apt-get autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.

mike@mike-Inspiron-2200:~$ rfkill list

0: phy0: Wireless LAN
Soft blocked: yes
 Hard blocked: no
3: phy3: Wireless LAN
Soft blocked: yes 
Hard blocked: no

mike@mike-Inspiron-2200:~$ rfkill unblock all
mike@mike-Inspiron-2200:~$ rfkill list

0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no 3:
phy3: Wireless LAN
Soft blocked: no
Hard blocked: no

mike@mike-Inspiron-2200:~$ lsmod | grep b43

b43 342801 0
mac80211 436493 1 b43
cfg80211 178877 2 b43,mac80211
bcma 25651 1 b43
ssb 50691 1 b43

mike@mike-Inspiron-2200:~$ dmesg | grep b43

[ 2.654782] b43-pci-bridge 0000:02:03.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[ 19.712097] b43-phy0: Broadcom 4318 WLAN found (core revision 9)
[ 19.840462] Registered led device: b43-phy0::tx
[ 19.840565] Registered led device: b43-phy0::rx
[ 19.840666] Registered led device: b43-phy0::radio
[ 36.904453] b43-pci-bridge 0000:03:00.0: enabling device (0000 -> 0002)
[ 36.904466] b43-pci-bridge 0000:03:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 36.904480] b43-pci-bridge 0000:03:00.0: setting latency timer to 64
[ 36.913476] b43-phy1: Broadcom 4306 WLAN found (core revision 5)
[ 36.963213] Registered led device: b43-phy1::tx
[ 36.963245] Registered led device: b43-phy1::rx
[ 36.963279] Registered led device: b43-phy1::radio

[ 1334.783146] b43-pci-bridge 0000:03:00.0: PCI INT A disabled
[ 1353.696423] b43-pci-bridge 0000:03:00.0: enabling device (0000 -> 0002)
[ 1353.696437] b43-pci-bridge 0000:03:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1353.696451] b43-pci-bridge 0000:03:00.0: setting latency timer to 64
[ 1353.704129] b43-phy2: Broadcom 4306 WLAN found (core revision 5)
[ 1353.753909] Registered led device: b43-phy2::tx
[ 1353.753942] Registered led device: b43-phy2::rx
[ 1353.753974] Registered led device: b43-phy2::radio
[ 1884.432089] b43-phy0: Loading firmware version 508.1084 (2009-01-14 01:32:01)
[ 1884.932090] b43-phy2: Loading firmware version 508.1084 (2009-01-14 01:32:01)
[ 2003.352113] b43-phy0: Loading firmware version 508.1084 (2009-01-14 01:32:01)
[ 2003.572040] b43-phy2: Loading firmware version 508.1084 (2009-01-14 01:32:01)
[ 2475.717013] b43-pci-bridge 0000:03:00.0: PCI INT A disabled
[ 2475.759016] b43-pci-bridge 0000:02:03.0: PCI INT A disabled
[ 2476.177343] b43-pci-bridge 0000:02:03.0: restoring config space at offset 0xf (was 0x100, writing 0x101)
[ 2476.177364] b43-pci-bridge 0000:02:03.0: restoring config space at offset 0x4 (was 0x0, writing 0xdfdfe000)
[ 2476.177371] b43-pci-bridge 0000:02:03.0: restoring config space at offset 0x3 (was 0x0, writing 0x4000)
[ 2476.177379] b43-pci-bridge 0000:02:03.0: restoring config space at offset 0x1 (was 0x0, writing 0x106)
[ 2476.888273] b43-pci-bridge 0000:03:00.0: restoring config space at offset 0xf (was 0x100, writing 0x110)
[ 2476.888302] b43-pci-bridge 0000:03:00.0: restoring config space at offset 0x4 (was 0x0, writing 0x28000000)
[ 2476.888310] b43-pci-bridge 0000:03:00.0: restoring config space at offset 0x3 (was 0x0, writing 0x4000)
[ 2476.888320] b43-pci-bridge 0000:03:00.0: restoring config space at offset 0x1 (was 0x0, writing 0x6)
[ 2476.949145] b43-pci-bridge 0000:02:03.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[ 2476.960101] b43-pci-bridge 0000:03:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 2478.367220] b43-pci-bridge 0000:03:00.0: PCI INT A disabled
[ 2478.367527] b43-pci-bridge 0000:03:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 2478.371308] b43-phy3: Broadcom 4306 WLAN found (core revision 5)
[ 2478.417345] Registered led device: b43-phy3::tx
[ 2478.417381] Registered led device: b43-phy3::rx
[ 2478.417412] Registered led device: b43-phy3::radio

__________________________

This did not help.
__________________________

I finally discovered that the wireless card was working and my issue was with the wireless security.
__________________________

It was working great... then I tried to setup VNC on the computer. I was following this:

https://www.digitalocean.com/community/articles/how-to-setup-vnc-for-ubuntu-12

I ran this:

apt-get -y install ubuntu-desktop tightvncserver xfce4 xfce4-goodies

And the wireless card stopped working. I repeated the fix above... did not help.

Did this (http://askubuntu.com/questions/152157/enable-wireless-option-is-disabled-in-network-settings):

---------------------------------------------------------------------------------------------
mike@mike-Inspiron-2200:~$ sudo lshw -C network
  *-network:0 UNCLAIMED  
       description: Network controller
       product: BCM4318 [AirForce 54g] 802.11a/b/g PCI Express Transceiver
       vendor: Broadcom Corporation
       physical id: 3
       bus info: pci@0000:02:03.0
       version: 02
       width: 32 bits
       clock: 33MHz
       capabilities: bus_master
       configuration: latency=64
       resources: memory:dfdfe000-dfdfffff
  *-network:1
       description: Ethernet interface
       product: 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile
       vendor: Intel Corporation
       physical id: 8
       bus info: pci@0000:02:08.0
       logical name: eth0
       version: 03
       serial: 00:12:3f:0e:30:74
       size: 100Mbit/s
       capacity: 100Mbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e100 driverversion=3.5.24-k2-NAPI duplex=full firmware=N/A ip=192.168.1.108 latency=64 link=yes maxlatency=56 mingnt=8 multicast=yes port=MII speed=100Mbit/s
       resources: irq:20 memory:dfdfd000-dfdfdfff ioport:df40(size=64)
  *-network UNCLAIMED
       description: Network controller
       product: BCM4306 802.11b/g Wireless LAN Controller
       vendor: Broadcom Corporation
       physical id: 1
       bus info: pci@0000:03:00.0
       version: 03
       width: 32 bits
       clock: 33MHz
       configuration: latency=0
       resources: memory:28000000-28001fff
---------------------------------------------------------------------------------------

It says the wireless is UNCLAIMED.

Found a discussion on a similar issue: http://askubuntu.com/questions/80745/wireless-disappeared-after-upgrading-on-top-of-a-tweaked-kernel


I thought this might be related to the xfce session that was still on the computer so I tried this:

http://askubuntu.com/questions/59640/how-can-i-completely-remove-xfce4-when-apt-get-remove-purge-doesnt-work

mike@mike-Inspiron-2200:~$ sudo apt-get purge libxfce4util-common
[sudo] password for mike:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages will be REMOVED:
  exo-utils* libexo-1-0* libgarcon-1-0* libthunar-vfs-1-2* libthunarx-2-0*
  libxfce4ui-1-0* libxfce4util-bin* libxfce4util-common* libxfce4util4*
  libxfconf-0-2* squeeze* thunar* thunar-archive-plugin*
  thunar-media-tags-plugin* thunar-volman* xfce4-notifyd* xfce4-panel*
  xfce4-power-manager* xfce4-session* xfce4-settings* xfce4-terminal*
  xfce4-utils* xfce4-volumed* xfconf* xfdesktop4* xfwm4*
0 upgraded, 0 newly installed, 26 to remove and 0 not upgraded.
After this operation, 30.8 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 222489 files and directories currently installed.)
Removing xfdesktop4 ...
Purging configuration files for xfdesktop4 ...
Removing xfce4-utils ...
Purging configuration files for xfce4-utils ...
Removing xfce4-terminal ...
Purging configuration files for xfce4-terminal ...
Removing xfce4-panel ...
Purging configuration files for xfce4-panel ...
Removing thunar-volman ...
Purging configuration files for thunar-volman ...
Removing thunar-media-tags-plugin ...
Removing thunar-archive-plugin ...
Removing thunar ...
Purging configuration files for thunar ...
Removing squeeze ...
Purging configuration files for squeeze ...
Removing exo-utils ...
Removing xfce4-session ...
Purging configuration files for xfce4-session ...
Removing xfce4-settings ...
Purging configuration files for xfce4-settings ...
Removing libthunarx-2-0 ...
Purging configuration files for libthunarx-2-0 ...
Removing libthunar-vfs-1-2 ...
Purging configuration files for libthunar-vfs-1-2 ...
Removing libexo-1-0 ...
Purging configuration files for libexo-1-0 ...
Removing libgarcon-1-0 ...
Purging configuration files for libgarcon-1-0 ...
Removing xfwm4 ...
Purging configuration files for xfwm4 ...
Removing xfce4-power-manager ...
Purging configuration files for xfce4-power-manager ...
Removing xfce4-notifyd ...
Removing libxfce4ui-1-0 ...
Purging configuration files for libxfce4ui-1-0 ...
Removing libxfce4util-bin ...
Removing xfce4-volumed ...
Purging configuration files for xfce4-volumed ...
Removing libxfconf-0-2 ...
Purging configuration files for libxfconf-0-2 ...
Removing xfconf ...
Removing libxfce4util4 ...
Purging configuration files for libxfce4util4 ...
Removing libxfce4util-common ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for hicolor-icon-theme ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
mike@mike-Inspiron-2200:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages will be REMOVED:
  libexo-common libexo-helpers libhal-storage1 libhal1 libkeybinder0 libtagc0
  libthunar-vfs-1-common libtumbler-1-0 thunar-data tumbler tumbler-common
  xfce-keyboard-shortcuts xfce4-power-manager-data xfdesktop4-data
0 upgraded, 0 newly installed, 14 to remove and 0 not upgraded.
After this operation, 18.5 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 219472 files and directories currently installed.)
Removing libexo-common ...
Removing libexo-helpers ...
Removing libhal-storage1 ...
Removing libhal1 ...
Removing libkeybinder0 ...
Removing libtagc0 ...
Removing libthunar-vfs-1-common ...
Removing tumbler ...
Removing libtumbler-1-0 ...
Removing thunar-data ...
Removing tumbler-common ...
Removing xfce-keyboard-shortcuts ...
Removing xfce4-power-manager-data ...
Removing xfdesktop4-data ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for man-db ...
mike@mike-Inspiron-2200:~$
__________________________

I give up... I am reinstalling ubuntu. :(

After reinstalling I did this:

sudo apt-get install linux-firmware-nonfree
sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source
sudo apt-get install b43-fwcutter firmware-b43-installer

Then I rebooted the system. After rebooting the wireless card was off. In the connections menu at the top of the screen it said the wireless was disconnected via a hardware switch. I did:

rfkill list

Which indicated a hard block on the wireless. I pressed Fn+F2 which turns on the wireless card.

Hooray! The wireless is working!!! Now if I can just avoid breaking the system. :)
__________________________

Other Links
http://www.ubuntu.com/
http://lubuntu.net/

Bat Files (File Renamer)

I am starting to do some work with batch (.bat) files in windows. These are simple DOS scripts that can be used in windows.

Getting Started

I suggest one download and use notepad++ to work with the .bat file. This is a free software that adds color coding to the code depending on the file name extension. (So it you open a file, fileName.bat, notepad++ will use the color coding for bat files.)

Basic Syntax

There are many resources on the internet to help with syntax and function in bat files. for instance, this site -- http://www.robvanderwoude.com/batchcommands.php -- has a alphabetical list of all commands. A command is issued in this form: [command] input1 input2 ... Type the name of the command followed by inputs. The number an types of inputs depends on the commands.

Some common commands.
  • Comments (This is important to remind yourself what you did in a file. The best way to learn to code is by looking at examples and building from your previous projects)
    • rem comment comment comment ....
  • make directory (Create a new folder, aka directory)
    • mkdir nameOfDirectory
  • directory (list the files and folders in the current directory or folder)
    • dir /options
  • text output
    • echo on (turns on automatic echo)
    • echo off (turns off automatic echo)
      • @echo off (turns off automatic echo without echoing the echo off command)
    • echo text (outputs text in the command line)

Examples

HellowWorld

To create your first bat file do the following:
  1. Install Notepad++
  2. Turn on file extensions
    1. click start button
    2. My computer
    3. in the menu bar at the top select Tools--folder options
    4. select the View tab
    5. make sure the following is unchecked: "Hide extensions for known file types"
    6. Now you will see the .xxx file extension for all files in windows.
  3. Create a new .bat file
    1. Right click on the desktop - new - text document
    2. Rename the file - HelloWorld.bat
  4. Right click on your batch (.bat) file and select "Edit with notepad++"
  5. Copy the following text and paste into the .bat file:
rem this is a comment. It does nothing.
rem the following turns off the echo
@echo off
rem see no more echo :)
echo Hello World!!
rem done!
pause
rem pause causes the window not to close so you can see the output.

6. save the file
7. double click on the file and you shoud see the output in the cmd window

Renamer

Name Extractor (To .csv)

@echo off
@set directory=C:\Directory
echo OriginalFileNames
echo OriginalFileNames > %directory%/OriginalList.txt
echo OriginalFileNames,NEW_SN,TDS,Type,Lot,Level,Week,Sample,File > %directory%/NewList.csv
FOR /r %directory% %%i in (*.raw*) do (
echo %%~nxi
echo %%~nxi >> %directory%/OriginalList.txt
echo %%~nxi >> %directory%/NewList.csv
)
@echo.
@echo Done
@echo.
@echo.
pause
@echo on

Renamer

@echo off
@set directory=Z:\13-1126PorcineControlContinuum\GoodControl\Continuum\Q460
@set list=%directory%\NewList.csv
FOR /F "skip=1 tokens=1,2,3,4,5,6,7,8,9* delims=, " %%A IN (%list%) DO (
echo Change: %%A
echo to:     "%%B_%%C_%%D_%%E_%%F_%%G_%%H_%%I"
ren "%directory%\%%A" "%%B_%%C_%%D_%%E_%%F_%%G_%%H_%%I"
)
@echo.
@echo Done
@echo.
@echo.
pause
@echo on

Links

http://notepad-plus-plus.org/

http://www.robvanderwoude.com/batchcommands.php

http://www.robvanderwoude.com/for.php

http://ss64.com/nt/for_f.html

http://ss64.com/nt/for_r.html

http://answers.yahoo.com/question/index?qid=20080107052807AAnryWH

http://stackoverflow.com/questions/10393248/get-filename-from-string-path

http://stackoverflow.com/questions/15450163/counter-in-batch

http://stackoverflow.com/questions/14013145/windows-batch-file-rename

http://www.dreamincode.net/forums/topic/40896-using-set-a-statements-in-windows-batch-file/

http://stackoverflow.com/questions/206114/batch-files-how-to-read-a-file

http://stackoverflow.com/questions/5034076/what-does-dp0-mean-and-how-does-it-work

http://stackoverflow.com/questions/9013941/how-to-run-batch-file-from-network-share-without-unc-path-are-not-supported-me

http://www.intelliadmin.com/index.php/2007/02/create-a-date-and-time-stamp-in-your-batch-files/

http://stackoverflow.com/questions/636381/what-is-the-best-way-to-do-a-substring-in-a-batch-file

http://stackoverflow.com/questions/1064557/creating-a-file-name-as-a-timestamp-in-a-batch-job