PS Script To Rename File Using CSV - Filename Is Containing IP Address And Needs To Be Host Name

Hello All,
I am currently working with PDF reports which are named "TEMXX.XX.XXX.XX_141215.pdf", XX.XX.XXX.XX is an IP address. I have created a CSV which contains two columns, ColumnA = IPAddress ColumnB = HostName. I would like to remove the existing title
of the file, and rename it as "ColumnB.pdf".
The only two commands which come to mind are:
get-childitem *.pdf | foreach { rename-item $_ $_.Name.Replace("TEM", "") }
get-childitem *.pdf | foreach { rename-item $_ $_.Name.Replace("_141215", "") }
The above commands are of course to remove the unwanted "TEM" and "_141215" but I cannot seem to figure out how to just rename files as ColumnB.pdf.
Any help would be greatly appreciated :).

Hello All,
I performed the following but it did not execute, just returned the prompt. The final ps1 file was saved and ran as follows:
$lines = Import-Csvservers.csv
ForEach($line in $lines){
get-childitem *.pdf |where {$_.name -eq $line.ColumnA}|Rename-Item -NewName $line.ColumnB
CSV file named servers.csv displayed as follows:
ColumnA,ColumnB
192.168.1.2,SERVER1
192.168.1.3,SERVER2
Files in Explorer displayed as follows:
ray192.168.1.2_2015.pdf
ray192.168.1.3_2015.pdf
As indicated above the filename should be finalized as:
SERVER1.pdf
SERVER2.pdf
Any help in figuring this out would be greatly appreciated.

Similar Messages

  • Apple Script to rename images using CSV file

    Hello, I have build a website using a Woocommerce for Wordpress. The site is going to have over 1200 images and they need to be renamed appropriately for each product. I've never used Apple Script before but after hours and hours of searching I have noticed people with similar issues have managed to solve the problem using AppleScript.
    I have attached a screenshot of the CSV file first 20 files - also the images are all saved in a folder with the names _DSC7916 copy 2.jpg etc etc.
    Hopefully my issue makes sense,

    In applescript it goes something like this:
              this all assuming the CSV file is a plain text file with a comma delimiting
              the old and new filenames on a given line. If you have another structure
              you need to give specifics so this can be modified
    set theCSVData to paragraphs of (read "/path/to/theCSVFile.csv")
    set {oldTID, my text item delimiters} to {my text item delimiters, ","}
    repeat with thisLine in theCSVData
              set {oldFileName, newFileName} to text items of thisLine
              tell application "System Events"
                        set name of file oldFileName of folder "path/to/folder of images" to newFileName
              end tell
    end repeat
    set my text item delimiters to oldTID
    Note that I've made a lot of assumptions about your csv file, any or all of which may be wrong. please clarify as needed.

  • Sedname - Batch rename files using sed

    Renaming files using sed is nothing new, but this script makes the process a little more friendly and adds a few features, including insertion of sequential numbers and a simulation mode.  The output of any find command can also be piped through sedname.
    sedname version 1.0.0
    Batch-renames files using a sed script
    Usage: sedname [OPTIONS] SEDSCRIPT FILE ...
    Usage: find [...] | sedname [OPTIONS] SEDSCRIPT
    Example: sedname 's/\(.*\)\.jpg/\1.jpeg/' *.jpg
    Example: find /mypics | sedname 's/\(.*\)\.jpg/\1.jpeg/'
    OPTIONS:
    --sim simulate only
    --dir rename directories too
    Use #D to insert a number with D digits forming a unique filename
    Example: sedname 's/thisname.*/thatname#3/' *
    ( changes thisname* to thatname001, thatname002, ... )
    Use #0 in replacement name to insert a number if needed
    Example: sedname 's/thisname.*/thatname#0/' *
    ( changes thisname* to thatname, thatname1, thatname2, ... )
    http://igurublog.wordpress.com/download … t-sedname/
    http://aur.archlinux.org/packages.php?ID=37707

    What does it have over zsh's zmv:
    # Remove illegal characters in a fat32 file system. Illegal characters are
    # / : ; * ? " < > |
    # NOTE: ``-Q'' and (D) is to include hidden files.
    $ unwanted='[:;*?\"<>|]'
    $ zmv -Q "(**/)(*$~unwanted*)(D)" '$1${2//$~unwanted/}'
    # Changing part of a filename (i. e. "file-hell.name" -> "file-heaven.name")
    $ zmv '(*)hell(*)' '${1}heaven${2}'
    # or
    $ zmv '*' '$f:s/hell/heaven/'
    # remove round bracket within filenames
    # i. e. foo-(bar).avi -> foo-bar.avi
    $ zmv '*' '${f//[()]/}'
    # serially all files (foo.foo > 1.foo, fnord.foo > 2.foo, ..)
    $ ls *
    1.c asd.foo bla.foo fnord.foo foo.fnord foo.foo
    $ c=1 zmv '*.foo' '$((c++)).foo'
    $ ls *
    1.c 1.foo 2.foo 3.foo 4.foo foo.fnord
    # Rename "file.with.many.dots.txt" by substituting dots (exept for the last
    # one!) with a space
    $ touch {1..20}-file.with.many.dots.txt
    $ zmv '(*.*)(.*)' '${1//./ }$2'
    # Remove the first 4 chars from a filename
    $ zmv -n '*' '$f[5,-1]' # NOTE: The "5" is NOT a mistake in writing!
    # Rename names of all files under the current Dir to lower case, but keep
    # dirnames as-is.
    $ zmv -Qv '(**/)(*)(.D)' '$1${(L)2}'
    # replace all 4th character, which is "1", with "2" and so on
    $ zmv '(???)1(???[1-4].txt)' '${1}2${2}'
    # Remove the first 15 characters from a string
    $ touch 111111111111111{a-z}
    $ zmv '*' '$f[16,-1]'
    # Replace spaces (any number of them) with a single dash in file names
    $ zmv -n '(**/)(* *)' '$1${2//( #-## #| ##)/-}'
    # or - with Bash
    $ find . -depth -name '* *' -exec bash -c '
    > shopt -s extglob
    > file=$1
    > dir=${file%/*}
    > name=${file##*/}
    > newname=${name//*([ -]) *([ -])/-}
    > mv -i -- "$file" "$Dir/$newname"' {} {} \;
    # Clean up file names and remove special characters
    $ zmv -n '(**/)(*)' '$1${2//[^A-Za-z0-9._]/_}'
    # Add *.py to a bunch of python scripts in a directory (some of them end
    # in *.py and give them all a proper extension
    $ zmv -n '(**/)(con*)(#qe,file $REPLY | grep "python script",)' '$1$2.py'
    # lowercase all extensions (i. e. *.JPG) incl. subfolders
    $ zmv '(**/)(*).(#i)jpg' '$1$2.jpg'
    # Or - without Zsh
    $ find Dir -name '*.[jJ][pP][gG]' -print | while read f
    > do
    > case $f in
    > *.jpg) ;
    > *) mv "$f" "${f%.*}.jpg" ;
    > esac
    > done
    # remove leading zeros from file extension
    $ ls
    filename.001 filename.003 filename.005 filename.007 filename.009
    filename.002 filename.004 filename.006 filename.008 filename.010
    $ zmv '(filename.)0##(?*)' '$1$2'
    $ ls
    filename.1 filename.10 filename.2 filename.3 filename.4 filename.5 ..
    # renumber files.
    $ ls *
    foo_10.jpg foo_2.jpg foo_3.jpg foo_4.jpg foo_5.jpg foo_6.jpg ..
    $ zmv -fQ 'foo_(<0->).jpg(.nOn)' 'foo_$(($1 + 1)).jpg'
    $ ls *
    foo_10.jpg foo_11.jpg foo_3.jpg foo_4.jpg foo_5.jpg ...
    # adding leading zeros to a filename (1.jpg -> 001.jpg, ..
    $ zmv '(<1->).jpg' '${(l:3::0:)1}.jpg'
    # See above, but now only files with a filename >= 30 chars
    $ c=1 zmv "${(l:30-4::?:)}*.foo" '$((c++)).foo'
    # Replace spaces in filenames with a underline
    $ zmv '* *' '$f:gs/ /_'
    # Change the suffix from *.sh to *.pl
    $ zmv -W '*.sh' '*.pl'
    # Add a "".txt" extension to all the files within ${HOME}
    # ``-.'' is to only rename regular files or symlinks to regular files,
    # ``D'' is to also rename hidden files (dotfiles))
    $ zmv -Q '/home/**/*(D-.)' '$f.txt'
    # Or to only rename files that don't have an extension:
    $ zmv -Q '/home/**/^?*.*(D-.)' '$f.txt'
    # Recursively change filenames with characters ? [ ] / = + < > ; : " , - *
    $ chars='[][?=+<>;",*-]'
    $ zmv '(**/)(*)' '$1${2//$~chars/%}'
    # Removing single quote from filenames (recursively)
    $ zmv -Q "(**/)(*'*)(D)" "\$1\${2//'/}"
    # When a new file arrives (named file.txt) rename all files in order to
    # get (e. g. file119.txt becomes file120.txt, file118.txt becomes
    # file119.txt and so on ending with file.txt becoming file1.txt
    $ zmv -fQ 'file([0-9]##).txt(On)' 'file$(($1 + 1)).txt'
    # lowercase/uppercase all files/directories
    $ zmv '(*)' '${(L)1}' # lowercase
    $ zmv '(*)' '${(U)1}' # uppercase
    # Remove the suffix *.c from all C-Files
    $ zmv '(*).c' '$1'
    # Uppercase only the first letter of all *.mp3 - files
    $ zmv '([a-z])(*).mp3' '${(C)1}$2.mp3'
    # Copy the target `README' in same directory as each `Makefile'
    $ zmv -C '(**/)Makefile' '${1}README'
    # Removing single quote from filenames (recursively)
    $ zmv -Q "(**/)(*'*)(D)" "\$1\${2//'/}"
    # Rename pic1.jpg, pic2.jpg, .. to pic0001.jpg, pic0002.jpg, ..
    $ zmv 'pic(*).jpg' 'pic${(l:4::0:)1}.jpg'
    $ zmv '(**/)pic(*).jpg' '$1/pic${(l:4::0:)2}.jpg' # recursively
    (from zsh-lovers)
    Edit: tried it now, and had to remove this silly block to make it let me use alternate delimiters:
    if [ "${sedscript:0:2}" != "s/" ]; then
    echo "Invalid sed script: $sedscript" > /dev/stderr
    exit 1
    fi
    Last edited by JohannesSM64 (2010-05-31 15:29:44)

  • Rename File using ABAP

    Hi,
    Can any one help me how to rename file using ABAP programme.
    Thanks,
    ABDUR

    use these function module
    RS_RENAME_PROGRAM              Rename Program With All Dependent Objects
    RS_RENAME_PROGRAM_INCLUDE      Rename Include Progam Without Any Other Objects

  • I am not able to use the ftp export in Muse. When I enter my host, name and password, I get a long interlude of rainbow wheel and finally the message that my ftp host cannot be found. I have verified the name and that it is port 21. I can export to html a

    I am not able to use the ftp export in Muse. When I enter my host, name and password, I get a long interlude of rainbow wheel and finally the message that my ftp host cannot be found. I have verified the name and that it is port 21. I can export to html and use another ftp client to upload (to the same server) but this is tedious and making minor changes is painful. Have you encountered this and found a solution?

    Hi Susan,
    In that case I will recommend that you consult a local technician/IT team and see if there is some network connectivity issue with your machine.
    - Abhishek Maurya

  • Using photoshop album starter edition 3.o and need to copy to laptop, missing my program cd.

    I am presently using photshop album starter edition 3.) and need to copy to new laptop.  I have misplaced my program cd.  Is there any way I can get this program on my laptop.  It is windows 7 and the photshop is on XL.  Thanks so much.

    I am sorry but we no longer have older software available for download.  I am not sure Photoshop Album Starter Edition would even function in Windows 7. 
    I would recommend trying Photoshop Elements 10 on your new computer.  It has all the features of Photoshop Album Starter Editon plus many more.  On top of that it has been designed to work with Windows 7.  You can find more details at http://www.adobe.com/products/photoshop-elements.html.

  • Someone in Australia was using my email address and when I changed email names to reinstall Itunes it only gives me states from Australia.  Is there some cache on my system that should be cleared or removed?

    Someone in Australia was using my email address and when I changed email names to reinstall Itunes it only gives me states from Australia.  Is there some cache on my system that should be cleared or removed?

    Good luck.    I have been trying to report to Apple Support about a Bogus Email I received today, which said I had made a purchase. Naturally, I was to cancel this bogus purchase by giving out personal details etc to them. 
    The real question is: how did they get my email as someone who had purchased from Itunes?. I cannot believe that ti si coincidence.
    HAVE the Australian Apple IDs [where users have supplied their email addresses] been compromised?
      My report about Spam was the same as reported in 2010, when the reply was: Apple knows all about this.  What has been done about that spam from this address:
    http://www.thepeakdistrictholidaycottage.co.uk/blog/wp-admin/au/apple//index.htm l?securitycenterlogin&hc=1&hm=au%601d72f%2Bj2b2vi%3C265securitycenterlogin&hc=1& hm=au%601d72f%2Bj2b2vi%3C265securitycenterlogin&hc=1&hm=au%601d72f%2Bj2b2vi%3C26 5

  • HT2155 I want to use hotmail as my email not icloud and need to connect new ipod to the same account as my ipod nano

    I want to use hotmail as my email not icloud and need to connect new ipod to the same account as my ipod nano

    Just setup the iPod with your Hotmail account email address/Apple ID
    The add the Hotmail email account to Settings>Mail

  • How do I know what OS I have on mu iMac? I've used it as a PC for years and need to switch over but I may be out of date with current software.  I think I read Lion somewehere....?

    How do I know what OS I have on my iMac? I've used it as a PC for years and need to switch over but I may be out of date with current software.  I think I read Lion somewehere....?  OS 10.5.8

    Click on the Apple icon at the top left of your menu bar, then About this Mac.
    OS 10.5.8 is Leopard. Lion is 10.7
    As for upgrading:
    Start by checking if you can run Snow Leopard:
    Requirements for OS X 10.6 'Snow Leopard'
    http://support.apple.com/kb/SP575
    The OS 10.6 Snow Leopard install DVD is available for $19.99 from the Apple Store:
    http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard
    and in the UK:
    http://store.apple.com/uk/product/MC573/mac-os-x-106-snow-leopard
    but nobody knows for how long it will be available.
    When you have installed it, run Software Update to download and install the latest updates for Snow Leopard to bring it up to 10.6.8, or download the combo update from here:
    http://support.apple.com/kb/DL1399
    Check via Software Update whether further updates are required.
    You should now see the App Store icon, and you now need to set up your account:
    http://support.apple.com/kb/HT4479
    To use iCloud you have to upgrade at least to Lion, but some functions are only available in Mountain Lion:
    http://support.apple.com/kb/HT4759
    You can also purchase the code to use to download Lion (Lion requires an Intel-based Mac with a Core 2 Duo, i3, i5, i7 or Xeon processor and 2GB of RAM, running the latest version of Snow Leopard), or you can purchase Mountain Lion from the App Store - if you can run that:
    http://www.apple.com/osx/specs/

  • Copying files using .csv as reference columns as reference

    I have a 30000 line CSV file that references different calls in different folders a full path than a file name that I need to copy the files to an other location
    the CSV has a few columns I had to concatenate 2 for the full path ..
    one column is named archivepath    the other is archivename
    I found this script but its not moving the files .. it created the full folder structure but that's it .. not sure what I maybe missing
    here is an example of the lines in the CSV file
    ArchivePath
    \\ xxxx\NICE\NICE\45\2013\11\6\  DC Storage   Center\164907\SC_1_5943223088294466706_5943223090437765702_39319605.nmf
    ArchiveNAme
    C_1_5943223088294466706_5943223090437765702_39319605.nmf
    #PowerShell script to create folder
    Set-Location “D:\Export\Files”
    $Folders = Import-Csv D:\call.csv -Header folders
     ForEach($Folder in $Folders) {
     New-Item $Folder.folders -type directory
     #Here is the PowerShell script for moving the files in required folder:
    $text = Import-Csv “D:\InputFile.csv”
    $dir = Get-ChildItem D:\Export\Files
     foreach($item in $text ){
     foreach ($folder in $dir) {
    #where Package is the name of the column in the csv file and FileName the name of #second column in the input csv file
     if($item.ArchivePath - eq $Folder.Name){
     $sourcefile = “D:\Export\” + $item.Archivename
    $target = “D:\Export\Files\” + $folder.Name
     Move-Item$sourcefile$target
    Write-Host“Folder $item.FileName moved sucessfully to $target”-ForegroundColor Green
    David Ulrich

    the folder paths are long so cant copy paste .. but
    line 1 headers --    Column B is the ArchivePath    Column C is File Name
    than 30000 lines  of full path like notes above in column B   and than the file name in C
    Is that what you are asking ?
    ,,ArchivePath,ArchiveName
    Nx\45\2013\11\6\x DC Storage Center\164907\SC_1_5943223088294466706_5943223090437765702_39319605.nmf,\\
    David Ulrich

  • Get old item name for renamed files using TFS API

    My current tfs will be retired in next few months.I am using tfs api to create a parallel tfs on a new server from the existing one. I have folders and solutions that have been renamed. I am iterating items and based on their changetype(add, edit, delete,
    sourcerename etc), I am checking them in destination tfs.
    I am not able to get Old filename for a file, in order to use PendRename when the item that is being iterated is Delete|SourceRename or Rename.
    I tried the mentioned solution :
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/f9c7e7b4-b05f-4d3e-b8ea-cfbd316ef737/how-to-get-previous-path-of-renamedmoved-of-file-using-tfs-api?forum=tfsgeneral
    But, my changeset has a lot of changes and hence identifying a particular file seems difficult.
    Do we have something that interraltes two items (the deleted and renamed) ones other than the changeset, because there needs to be a uniquely identifier that associated the two items so that they may appear together in TFS history?

    Hi Fabcoder,
    As Daniel mentioned, you can migrate source control files and work items to the new TFS server by using TFS integration tools.
    If the new server has the complete history, then you can view the history of the specific file to check the pervious path. Or you can do a compare between the project in new TFS where the file located with the matched project in current TFS to check
    the differences.
    Best regards, 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Rename files using text or excel file

    I am trying to find out how to rename files on my pc using the names stored in a text document
    eg. the file on the pc is called "C07_08.dat"
    the text file has the following line "3am Eternal         KLF         03:15 121 BMG         C07.08"
    i want to change the name of the file "C07_08.dat" to "3am Eternal.mpeg"
    What I would like is a batch file or program or something that will see the text "C07.08" and find the corresponding file "C07_08.dat" and rename it "3am Eternal.mpeg"
    I have managed to create a excel document that has the information in four separate columns
    Column A has the name of the file I want to use (ie. 3am Eternal) Column B & C have unneeded information and Column D has the file reference (ie. C07.08)
    I was told that Python or Visual basic could do this so I downloaded them but I have no experience with this so im lost as to what to do, I have over 1800 of these files so doing it file by file will take quite a while.
    I have included a sample of the text file for reference if that helps
    3am Eternal KLF 03:15 121 BMG C07.08
    4 In The Morning Gwen Stefani 04:22 092 UMA HD1.10
    4 Minutes Madonna ft J Timberlake 04:04 113 WAR HE3.05
    5 6 7 8 Steps 03:24 000 BMG C48.03
    5678 Steps 03:23 140 MUS H16.02
    6 Of 1 Thing Craig David 03:15 116 WAR HE2.11
    60 MPH New Order 03:51 125 WAR N57.11
    7 Days Craig David 04:30 084 SHO N41.16
    7 Things Miley Cyrus 03:29 107 EMI HE7.09
    99 Luft Balloons Nena 03:58 095 WAR C27.10
    99 Times Kate Voegele 03:27 112 UMA HG6.07
    A Girl Like You Edwyn Collins 03:47 126 MDS R06.08
    A Little Bit Pandora 03:35 132 UMA H23.01
    A Little Less Conversation Elvis VS JXL 03:02 115 BMG H68.03
    A Matter Of Trust Billy Joel 04:00 110 SON C59.11
    A New Day Has Come Celine Dion 04:20 092 SON H65.20
    A Woman Like You Mondo Rock 04:03 169 MUS R06.01
    About You Now Sugababes 03:32 083 UMA HD5.08
    Absolutely Everybody Vanessa Amorosi 03:52 124 TRA H40.06
    Absolutely Fabulous Pet Shop Boys 03:45 132 EMI C15.02
    Accidentally In Love Counting Crows 03:08 138 UMA H94.05
    According To You Orianthi 03:18 066 UMA HG4.12
    Achy Breaky Heart Billy Ray Cyrus 03:55 122 SON K11.02

    Here are two VBScripts that will rename the files based on the text file example you provided. The script that reads a
    TEXT FILE requires each entry to be separated by
    ONE TAB  because it is the
    TAB
    that it uses to split each line into 4 parts (part1 - old file name, part2 and part3 - items you don’t need, part 4 - new file name). If there is more that one tab then the Split Function will not work properly.
    The second VBScript will read the
    EXCEL FILE row by row and use the values in Column A for the old file name and
    Column D for the new file name. This approach will work much better if you have an excel document setup like this.
    I used your example that you provided and it test fine for both approaches.
    'Read text file
    Dim objFSO, objFolder, inFile, strInLine, strOldFile, strNewFile
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    'Select the folder
    Set objFolder = objFSO.GetFolder("C:\Scripts\MusicFiles")
    'Open Text File
    Set inFile = objFSO.OpenTextFile("C:\Scripts\MusicFiles.txt",1)
    Do Until inFile.AtEndOfStream
    'Read text file line by line and Split each line into 4 parts.
    strInLine = Split(inFile.ReadLine, vbTab)
    'Old File name
    strOldFile = strInLine(3)
    'new File name
    strNewFile = strInLine(0)
    'Loop through the files in the folder
    For Each File In objFolder.Files
    'If the file name matches the old file name above
    If File.Name = strOldFile & ".dat" Then
    'Replace it
    File.Name = strNewFile & ".mpeg"
    End If
    Next
    Loop
    'Close the text reader
    inFile.Close
    MsgBox "Done."
    'Read Excel file
    Dim objFSO, objExl, objFolder, objWorkbook, strOldFile, strNewFile, intRow
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objExl = CreateObject("Excel.Application")
    'Select the folder
    Set objFolder = objFSO.GetFolder("C:\Scripts\MusicFiles")
    'Open the Excel file
    Set objWorkbook = objExl.Workbooks.Open("C:\Scripts\MusicFiles.xls")
    'Start at row 1
    intRow = 1
    'Read each Row until the end
    Do Until objExl.Cells(intRow,1).Value = ""
    'Old file name is in column 4
    strOldFile = objExl.Cells(intRow, 4).Value
    'New file name is in column 1
    strNewFile = objExl.Cells(intRow, 1).Value
    'Loop through each file in the selected folder
    For Each File In objFolder.Files
    'If the file name matches the old file name above
    If File.Name = strOldFile & ".dat" Then
    'Replace it
    File.Name = strNewFile & ".mpeg"
    End If
    Next
    'Increment each row
    intRow = intRow + 1
    Loop
    'Close Excel
    objExl.Quit
    MsgBox "Done."
    v/r LikeToCode....Mark the best replies as answers.

  • Automator: Impossible to rename file using automator under Mac OS X Lion

    Hi,
    Before upgrade my iMac to MAC OS X Lion 10.7.2, I had service created with automator under snow leopard in order to rename my pictures file names by blocks instead of one by one. Since I'm using Lion, this one doesn't work anymore. I have completely recreate the service under Lion and the results is the same.
    You can find below my workflow that is easy. The problem is the message error in the history of automator application. The message is "impossible to rename file "file name" because this one should create conflict with existing file". I already test a lot of times with different name where I'm sure that this one doesn't exist on my Mac but all the time without success (verify also with search function under mac)
    If somebody can help me, it would be very interesting because I already tried to find answer on internet without success too.
    Thanks in advance for your help.

    the whole automator and in particular the record action was substantially rewritten in snow leopard. and the record action is slow, unreliable and you can't trouble-shoot it. it's a wonder it works at all. the only advice i can give is to use it as little as possible. if at all possible avoid it altogether. if you do need to use it try using keyboard strokes instead of the mouse movement. for example. use command+c and command+v for copying and pasting and use tabbing to choose the correct box on the page.

  • Rename files using Enter key

    Using the Enter key to rename files and folders works only with items in the desktop. Everywhere else I need to use Command+Enter. Any one experiencing this behavior? Any ideas on how to make it work as it should (only Enter needed)?

    Thanks Bazsl,
    Lua is the language chosen by Adobe for plugins. It's also the language used for some of Lightroom proper.
    PS - In my opinion, Lua is a great little language, although the plugin environment is limited..

  • Renaming files using a list of names in a txt or csv file

    Hello everyone,
    I'm trying to use AppleScript (although I'm a total noob to it) to rename the files in a folder (if possible using something like this - set folder to choose folder) to coincide to a list of names (in a txt or csv - can be any extension needed).
    To paint the picture clearer I'll have something like this
    Files_as_they_are
    Files_renamed
    01.mkv
    Valar Dohaeris.mkv
    02.mkv
    Mhysa.mkv
    Here is what I've tryed so far : (some point through the night I've tryed to repeat part of the process thus the "fcount" but the result was even worse)
    set theFolder to choose folder
    set ep to {"Valar Dohaeris", "Dark Wings, Dark Words"}
    set fcount to 1
    tell application "Finder"
      set name of file fcount of theFolder to item fcount of ep
    end tell
    set fcount to fcount + 1
    Tnx in advance...

    This will work with a comma separated text file,
    i.e.:
         Files as the are, Files Renamed
         01.mkv, Valar Dohaeris.mkv
         02.mkv, Mhysa.mkv
    Note that if the file to be renamed exists, it will be overwritten (A test can be added to skip if exists if needed)
    set theFoler to POSIX path of (choose folder with prompt "Choose folder with Files" default location path to desktop)
    set theFile to POSIX path of (choose file with prompt "Choose TXT file" default location path to desktop)
    do shell script "
    cd " & quoted form of theFoler & "
    while read line  
    do  
         OldImageName=${line%,*}
         NewImageName=${line#*,}
         if [ -e \"$OldImageName\" ] ; then
              mv \"$OldImageName\" \"$NewImageName\"
         else
              echo \"$OldImageName\" >> ~/Desktop/Errors.txt
         fi
    done < " & quoted form of theFile & "

Maybe you are looking for

  • Uploading and reading file from application server

    Hi My problem is when am uploading a file to application server it is getting stored in usr/sap/transyp1/prod/in   directory after that i want to read that file from application server to update database when  using below code it is showing some othe

  • Macbook air's fan not turning off and it will not sleep when the lid is closed?

    I downloaded OS X Mavericks yesterday.The fan will not turn off. It runs whenever i turn on the computer. The computer does  not turn off when i close the lid, and the fan still runs. There is also no battery icon anymore on my home screen. Is this j

  • Can't generate SPREADSHEET output in Reports 10.1.2.0.2

    We are using Reports 10.1.2.0.2. I want to generate in my (Not deployed in the AS) PC a simple tabular report but in spreadsheet format. I use this command line command in a batch file. d:\OracleDevR1\bin\rwrun.exe    USERID=user1/user123@db1       R

  • What is "Category" field for?

    In the iTunes List View, you can change or enter info for most columns for a song, for example the name column, by simply clicking in that column. The insertion point appears and you can type or change the name of an item. However, this doesn't happe

  • Audio Out always working?

    I have a question about the audio analog output of the 19SL410U TV.  Will muting or changing the volume of the TV have any effect on the output of the L and R stereo jacks on the back of the set? Is my assumption that the output terminals provide sta