[SOLVED] massive rename help

hi this is my very first message asking for help.
I want to rename a lot of files via terminal, each 10 files are in different folders, which are arranged in this way:
.../my_files
    |---/folder_01
    |---/folder_02
    |---/folder_03
and the name of this is something like:
[name] of the file.png (with the spaces)
I want to rename the files in ascending numbers like:
Folder 01
0001.png
0002.png
Folder 05
0110.png
can you help me to figure it out?
(I use the terminal everyday, is just that I haven't faced this situation before.)
PD: to get the answer go right to the end of this page
Last edited by shuuichi_nitori (2013-01-09 18:07:08)

If I understand your problem correctly, then you can use qmv to do your job. Considering the following directory structure:
$ ls -1R my_files/
my_files/:
folder_01
folder_02
my_files/folder_01:
a file.png
another file.png
whatever.png
my_files/folder_02:
some name.png
some other name.png
use
qmv -R my_files/
or
qmv -f do -R my_files/
and change file names. Of course you don't have to do it by hand -- you can just generate new names automagically and then paste them to the editor launched by qmv.
Then do the same with directory names and you're done. Example result:
$ ls -1R my_files/
my_files/:
Folder 01
Folder 02
my_files/Folder 01:
0001.png
0002.png
0003.png
my_files/Folder 02:
0011.png
0012.png
Last edited by msthev (2012-12-30 12:51:51)

Similar Messages

  • My speaker is not working properly in 4s if i use headphone its working now my volume increase decrease button is also not working properly how can i solve it pl help me my warranty finished

    my speaker is not working properly in 4s if i use headphone its working now my volume increase decrease button is also not working properly how can i solve it pl help me my warranty finished

    Hello. I sent my WRT1900AC V1 to Linksys four days ago (Monday) via UPS with a RMA. Linksys paid the shipping and everything. The router is still in route, and it should arrive to their offices tomorrow. Once they receive the WRT1900 AC V1, they are going to send me an EA8500 as a replacement. But I have been reading the comments about the EA8500 here in the forum and it seems to have the same problems. I guess the firmware is extremely flawed in both routers (maybe it is almost the same code?). Anyway, I will try the EA8500 and I hope it works. I bought a temporary router from Walmart and I paid $35 for it. It is a Belink N600 DB. I can't believe that a $35 router is working a lot, lot, lot better than my previous $250 WRT1900AC router. Unbelievable. If the EA8500 doesn't work, I'm going to try and get my money back from Linksys, or contact The Consumerist or someone to get my money back and get a Nighthawk instead.

  • TS3899 In my iPad 2 with IO6 today I can not send emails from my gmail account, they go to the outbox directly...why? How can i solve this problem? ..I restarted the IPad but the problem was not solved. Please help.

    In my iPad 2 with IO6 today I can not send emails from my gmail account, they go to the outbox directly...why? How can i solve this problem? ..I restarted the IPad but the problem was not solved. Please help.

    Greetings,
    Questions:
    1. What version of the Mac OS are you running (Apple > About this Mac)?
    2. What version of the iOS are you running (Settings > About)?
    3. Do you use MobileMe/ iCloud or another server based sync solution like Google or Yahoo?
    4. Do other changes to synced information like Address Book content sync successfully back and forth?
    Based on your description it sounds like you have a 1 way sync issue.  Events sync fine between the iOS devices and fine from the computer to the iOS devices but not from the iOS devices to the computer.
    Try:
    Backup your computer and iOS devices before doing anything else:
    http://support.apple.com/kb/HT1427
    http://support.apple.com/kb/ht1766
    Ensure all the devices in use are fully up to date: Apple > Software Update / Settings > General > Software Update
    Make separate backups of critical data:
    Backup your computer Addressbook: http://docs.info.apple.com/article.html?path=AddressBook/4.0/en/ad961.html
    Backup your computer iCal: http://support.apple.com/kb/HT2966
    Reset syncing on your Mac: http://support.apple.com/kb/TS1627
    Reply back if that does not resolve your issue.
    Hope that helps.

  • I'm using firefox 6.0.2 It's making problem with Bangla font ONLY on FACEBOOK others bangli website FORNT SIZE are OK. On the FACEBOOK it shows Bangla font in a very / Too small! I change font SIZE in firefox setting but i can't solve. Pls HELP me

    I'm using firefox 6.0.2 It's making problem with Bangla font ONLY on FACEBOOK others bangli website FORNT SIZE are OK. On the FACEBOOK it shows Bangla font in a very / Too small! I change font SIZE in firefox setting but i can't solve. Pls HELP me ..

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    You can use an extension to set a default font size and page zoom on web pages.
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • HT3964 I am getting the error message "No AirPort card installed" Restarting my iMac desktop does not solve this (Apple help says I need to reset the SMC this way, but nothing changes. Can somebody advise, please?

    I am getting the error message "No AirPort card installed" Restarting my iMac desktop does not solve this (Apple help says I need to reset the SMC this way, but nothing changes). Can somebody advise, please?

    Thanks for the flag J.K. - they contaced me and solved my problem.  On this account (which I created just to ask this question), I log in with my email rather than my user name (mtalldud). On the account that I was having trouble with, they told me to use my user ID instead of my email to log in and it worked. This is a bit confusing and seems a bit inconsistent but at least I don't need this temporary account any more to get into this community and find answers!

  • I recently updated my iPhone to version 7.0.4. After that my facebook app crashes much often and the problem of freezing is also increased. How to solve that? Help!!

    Most recently, I updated my iOS version to 7.0.4. After that, my facebook app often gets crashed and even though I re-install it, the problem persists. And also, the phone freezes much often. I am really afraid that my device is damaged or engulfed with bugs. How can I solve this? Help please!!

    Time to update to iOS 7.0.6.

  • My Apple ID is still disabled. How to fix it? I tried the steps given but just cant be solved. Please help.

    My Apple ID is still disabled. How to fix it? I tried the steps given but just cant be solved. Please help. i use right keyword but cant open apple id my

    Goldboyvidar wrote:
    how i can open my apple id?? 
    As the article states, you need to reset your password.
    how i can talk to apple center and i am deaf cant call them and them have not email???
    You can contact Apple Support online here
    or
    by phone: Apple Support Numbers

  • Zumo game freezes ipod. reset and restored has not solved it. Help !

    I have a 5th generation video ipod with 1.2 software. It has worked perfectly until I downloaded zumo. Since then it freezes between screens. I have restarted the ipod, reset it and restored the software - none of which has solved the problem. I have tried e mailing Apple but the form would not send and I spent 25 minutes on hold. I am ready to scream ! - can anyone help me ??

    well there are 3 places you might want to go.
    here,hereand here
    Ryan G.

  • Dreamweaver Renaming help

    Hi,
    I took over a project for someone and a bug was assigned to
    me saying that we needed to change the a few of our folder names
    within the site.
    I'm not too familiar with dreamweaver but it is what we used
    to create the site. I tried renaming 1 of the folders through
    dreamweavers file manager but after typing in a different folder
    name it comes back with an error message.
    "A file with that name you specified already exists"
    regardless to what I chose to rename it as.
    I right click the folder that is displayed in the Files tab
    of the site management. Then I go to Edit > Rename.
    I'm hoping there is some way to rename these folders where it
    will update all the links.
    Any help would be appreciated.

    Do you have any files that might reside in that folder open
    at the time?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Tim316" <[email protected]> wrote in
    message
    news:g5ihiv$15m$[email protected]..
    > Hi,
    >
    > I took over a project for someone and a bug was assigned
    to me saying that
    > we
    > needed to change the a few of our folder names within
    the site.
    >
    > I'm not too familiar with dreamweaver but it is what we
    used to create the
    > site. I tried renaming 1 of the folders through
    dreamweavers file manager
    > but
    > after typing in a different folder name it comes back
    with an error
    > message.
    >
    > "A file with that name you specified already exists"
    regardless to what I
    > chose to rename it as.
    >
    > I right click the folder that is displayed in the Files
    tab of the site
    > management. Then I go to Edit > Rename.
    >
    >
    > I'm hoping there is some way to rename these folders
    where it will update
    > all
    > the links.
    >
    > Any help would be appreciated.
    >

  • [SOLVED] Need some help getting the sound to work again

    Recently I changed the motherboard and CPU to an AM3 platform, everything works with my previous setup except sound.
    Reinstalling alsa-utils and rebooting had absolutely no effect. Google didn't help either.
    lspci -v
    00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 8415
    Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 11
    Memory at dfff4000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel modules: snd-hda-intel
    The motherboard documentation refers to it as "VIA VTI708S".
    VLC complains about alsa-lib. Reinstalling it also didn't help.
    aplay /usr/share/sounds/alsa/Front_Center.wav
    ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
    ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
    ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
    ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib conf.c:4633:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default
    aplay: main:654: audio open error: No such file or directory
    alsamixer
    cannot open mixer: No such file or directory
    Edit:
    Damn ASUS font... It's "VIA VT1708S" (number one, not the letter "i") !  Duh. No wonder Google couldn't find any info.
    Still, any ideas ? Or would you just rather let me squirm a little and diagnose the problem myself ?
    Last edited by DSpider (2010-11-28 18:15:41)

    sudo modprobe snd-hda-intel
    (I think it's what you tried to tell me, igndenok)
    Great. It took the bulk of my day trying to figure out how to get this thing to work.
    VolWheel is now set to adjust "Master Front" (it was previously set to "Master" with the old motherboard) and the Sonata volume bar apparently works too, just like I wanted (adjusting the PCM volume by default). Good. Great ! Now I just need to set the "snd-hda-intel" module to load at boot so I don't have to type "sudo modprobe snd-hda-intel" all the time and this thread can be considered SOLVED.
    sudo nano /etc/rc.conf
    ...and add the following:
    MODULES="... snd-hda-intel ..."
    (also removed snd-ac97-codec from the list because that's what the old mobo used)
    THANKS FOR ALL YOUR HELP !
    PS: Just out of curiosity, why is it called "snd-hda-intel" ? Why intel ? The CPU is AMD, the chipset is Nvidia nForce, sound is VIA...
    Anyone know ? I'll subscribe to this topic just in case anyone knows. Thanks again.
    Last edited by DSpider (2010-11-28 18:16:36)

  • [ solved ] nomodset, need help using this

    So I have Windows 7 and Ubuntu installed on my newish Pavilion d6. I had to follow these instruction to get it working with Ubuntu:
    http://www.adminscode.com/ubuntu-instal … ystem.html
    No other distro including Arch will curently let me boot on this machine. I get halfway through the boot process and then a black screen.
    I have Arch on a usb stick that boots fine on my desktop so I know the img on it is fine. When the arch boot screen pops up, I tab on the first arch boot option and add "nomodset" to the end of the line. Is this wrong?
    My goal is to install Arch and then the ATI drivers from the catalyst repo. Judging by the above instructions for Ubuntu this should work on Arch if I can just get it to boot up. Any help would be appreciated, I'm sure I'm just adding the boot option incorrectly.
    * My apologies. I appear to have fat fingers. Marked as solved
    Last edited by Durden (2011-12-22 07:16:09)

    So I have Windows 7 and Ubuntu installed on my newish Pavilion d6. I had to follow these instruction to get it working with Ubuntu:
    http://www.adminscode.com/ubuntu-instal … ystem.html
    No other distro including Arch will curently let me boot on this machine. I get halfway through the boot process and then a black screen.
    I have Arch on a usb stick that boots fine on my desktop so I know the img on it is fine. When the arch boot screen pops up, I tab on the first arch boot option and add "nomodset" to the end of the line. Is this wrong?
    My goal is to install Arch and then the ATI drivers from the catalyst repo. Judging by the above instructions for Ubuntu this should work on Arch if I can just get it to boot up. Any help would be appreciated, I'm sure I'm just adding the boot option incorrectly.
    * My apologies. I appear to have fat fingers. Marked as solved
    Last edited by Durden (2011-12-22 07:16:09)

  • Almost solved, just need help with a service file!

    Hey all,
    For some time now my systemd sleep hook has stopped working (e.g. only killing my program and not relaunching it when waking up). Only now I have time to look into it, though, so I can't really say if any update caused this.
    I had a custom sleep hook in /usr/lib/systemd/system-sleep/dwmstatus.sh, which killed my dwm-status program before going to sleep/suspend and started it again when waking up. It looked like this:
    #!/bin/sh
    case $1 in
    pre) killall dwm-status
    post) dwm-status
    esac
    exit
    I've been looking into it and noticed the example on the Wiki (my previous script above was a direct copy of the old example) got updated, so I updated mine accordingly. It now looks like this:
    #!/bin/sh
    case $1/$2 in
    pre/*)
    echo "Going to $2, killing dwm-status"
    killall dwm-status
    echo "dwm-status killed"
    post/*)
    echo "Waking up from $2, starting dwm-status"
    exec /usr/bin/dwm-status &
    echo "dwm-status started"
    esac
    But that's not working either. (The echos are just here for debugging this). I first tried using just dwm-status to start it again, but it didn't work. Then I tried the full path without result too and now with exec I still am not getting anywhere. Can someone explain to me why it's not working anymore?
    Last edited by Unia (2012-12-24 13:31:46)

    Now that I have solved all the outstanding issues and integrated quite a bunch of new features into dwmst (rename of dwm-status) it's only this issue that needs to be resolved. I still can't get dwmst to launch again after suspend/hibernate.
    I checked journalctl but it comes up without any errors whatsoever:
    ┌─[jente @ lappy ~] 20:07:40
    └─■ sudo journalctl -b -u systemd-suspend
    -- Logs begin at wo, 2012-10-31 12:43:25 CET, end at wo, 2012-12-19 20:08:36 CET. --
    dec 19 20:08:10 lappy systemd-sleep[1174]: xset: unable to open display ""
    dec 19 20:08:10 lappy systemd-sleep[1174]: Suspending system...
    dec 19 20:08:19 lappy systemd-sleep[1174]: System resumed.
    dec 19 20:08:19 lappy systemd-sleep[1174]: ERROR: could not open display
    dec 19 20:08:19 lappy systemd-sleep[1174]: xset: unable to open display ""
    Or is it that xset error?
    EDIT: I just removed my script from /usr/lib/systemd/system-sleep to check the output, and I still get the xset error but not the ERROR line:
    dec 19 20:12:12 lappy systemd-sleep[1329]: xset: unable to open display ""
    dec 19 20:12:12 lappy systemd-sleep[1329]: Suspending system...
    dec 19 20:12:21 lappy systemd-sleep[1329]: System resumed.
    dec 19 20:12:21 lappy systemd-sleep[1329]: xset: unable to open display ""
    So I guess that ERROR: could not open display is the error dwmst generates when it tries to launch it? Further investigation will have to follow, but in the meantime I'm open for pointers!
    EDIT2: The ERROR line is not related to dwmst. I put some echo lines before and after killing and launching dwmst and the ERROR line appears after the echo's:
    dec 19 20:16:57 lappy systemd-sleep[1443]: System resumed.
    dec 19 20:16:57 lappy systemd-sleep[1443]: starting dwmst
    dec 19 20:16:57 lappy systemd-sleep[1443]: started dwmst
    dec 19 20:16:57 lappy systemd-sleep[1443]: ERROR: could not open display
    dec 19 20:16:57 lappy systemd-sleep[1443]: xset: unable to open display ""
    Last edited by Unia (2012-12-19 19:18:34)

  • [Solved] Xinerama setup help

    I'm trying to set up Xinerama for use with Xmonad, but I need some help with my xorg.conf.  I have a thinkpad T40p, with an ati mobility radeon R250 FireGL video card.  I want to use the laptop screen as the default screen, and an external monitor connected to the laptop's VGA port as the second screen. 
    Here is my xorg.conf
    grep -A 5 "WW\|EE" /var/log/Xorg.0.log reports:
    (WW) RADEON(0): Direct Rendering Disabled -- Dual-head configuration is not working with DRI at present.
    Please use the radeon MergedFB option if you want Dual-head with DRI.
    (II) RADEON(0): Detected total video RAM=65536K, accessible=65536K (PCI BAR=131072K)
    (--) RADEON(0): Mapped VideoRAM: 65536 kByte (128 bit DDR SDRAM)
    (II) RADEON(0): Using 32768k of videoram for primary head
    (II) RADEON(0): Color tiling disabled
    (WW) RADEON(0): LVDS Info:
    XRes: 1400, YRes: 1050, DotClock: 84960
    HBlank: 200, HOverPlus: 72, HSyncWidth: 40
    VBlank: 12, VOverPlus: 2, VSyncWidth: 1
    (II) RADEON(0): Output S-video has no monitor section
    (II) RADEON(0): Default TV standard: NTSC
    (WW) RADEON(1): Direct Rendering Disabled -- Dual-head configuration is not working with DRI at present.
    Please use the radeon MergedFB option if you want Dual-head with DRI.
    (II) RADEON(1): Detected total video RAM=65536K, accessible=65536K (PCI BAR=131072K)
    (--) RADEON(1): Mapped VideoRAM: 65536 kByte (128 bit DDR SDRAM)
    (II) RADEON(1): Using 32768k of videoram for secondary head
    (II) RADEON(1): Color tiling disabled
    (WW) RADEON(1): LVDS Info:
    XRes: 1400, YRes: 1050, DotClock: 84960
    HBlank: 200, HOverPlus: 72, HSyncWidth: 40
    VBlank: 12, VOverPlus: 2, VSyncWidth: 1
    (II) RADEON(1): Output S-video has no monitor section
    (II) RADEON(1): Default TV standard: NTSC
    (WW) RADEON(0): Direct rendering disabled
    (II) RADEON(0): Render acceleration enabled
    (II) RADEON(0): Using XFree86 Acceleration Architecture (XAA)
    Screen to screen bit blits
    Solid filled rectangles
    8x8 mono pattern filled rectangles
    Full log file available here.  Thanks for any help!
    Last edited by PeteMo (2008-10-31 10:55:09)

    Below is xrander's output with the external monitor connected:
    $ xrandr
    Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 1400 x 1200
    VGA-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
    1280x1024 74.9* 75.0 59.9 60.0
    1024x768 74.9 75.1 70.1 60.0 59.9
    832x624 74.6
    800x600 72.2 75.0 74.9 60.3 59.9 56.2
    640x480 75.0 72.8 74.8 66.7 60.0 59.4
    DVI-0 disconnected (normal left inverted right x axis y axis)
    LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
    1400x1050 50.0*+
    1280x800 60.0
    1280x768 60.0
    1024x768 60.0
    800x600 60.3
    640x480 59.9
    S-video disconnected (normal left inverted right x axis y axis)
    And here is the xorg log without an xorg.conf in place
    I do get output on the second monitor with no xorg conf in place, and with my old xorg.conf, from before I tried setting up for a second monitor.  However, the second monitor is simply a clone of the first, while I want an extended desktop...basically one workspace on each screen in xmonad.  I based my xorg.conf on this link, mainly, which is where the second device, screen, etc sections came from.

  • [Solved] Massive bootproblems with kernel26 2.6.38

    I don't know what's wrong with my computer, so I post it here:
    Every kernel before 2.6.39 worked fine with 'irqpoll' as kernel parameter.
    'Irqpoll' is needed, otherwise the boot hangs somewhere and I have to press Enter several times to continue.
    The problem is now: current kernels refuse to boot, I just get a blinking monitor or errormessages.
    I've read that 2.6.39 got a different IRQ handling, maybe that is the 'problem'.
    Bios version in the latest, I tried everything. Disabled HPET, changed Bios IRQ settings, kernel parameter (irqpoll irqfixup noacpi noapic nolapic erst_disable hest_disable) ...
    acpi=off is the only option which works fine.
    Today I fixed my DSDT (produces 0 error and warnings now) and compiled it into kernel26-mainline (3.0-rc3) -> same problem.
    Last edited by Radioactiveman (2011-06-15 15:30:59)

    I've found out that disabling C1E in the Bios helps.
    After searching the forum I read this solution again -> https://bbs.archlinux.org/viewtopic.php?id=92801
    'irqpoll' is also no more necessary.
    More information:
    https://bugzilla.kernel.org/show_bug.cgi?id=15289
    https://bugzilla.kernel.org/show_bug.cgi?id=28612
    Last edited by Radioactiveman (2011-06-15 15:30:18)

  • Itunes says it cannot ascess my ipad4 and it says there is a new version of ios mine is 7.0.3 how can i solve this please help

    i have the new version of i tunes and it says it cannot ascess my ipad4 and asks to upgrade and reset how to solve this????

    You can try resetting your iPad by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears.
    Try again to see if the problem persists.
    I recommend syncing to iTunes first as well as creating a backup - just in case something goes wrong.
    Then you can update your iPad. Go to Settings > General > Softwware Update to start the process.

Maybe you are looking for

  • Q:-  Migrating version 6 Web Analysis reports directly to version 11  ??

    Trying to migrate version 6 Web Analysis reports directly to version 11.1.1.2 without first migrating to version 9, because of some time constraints. Overall it works fine, except for some issue with PV (Personal Variables) in those reports. The PVs

  • Unable to call report from forms-oracle9iDS.

    hi.., i created a report in reports 9i and calling the same from a form created in 9i,i am calling from a push button having following code in it.., Declare report_id Report_Object; ReportServerJob VARCHAR2(100); BEGIN report_id:= find_report_object(

  • ORA-12801 ORA-08103 while running gather schema stats in R12

    Hi All, We have recently upgraded from 11.5.9 to R12.1.1 on RHEL 4.8 Database version is 10.2.0.5 We are running Gather schema stats on R12.1.1 but its Errored out with below messages. ORA-12801: error signaled in parallel query server P006 GL.GL_JE_

  • Altering refresh rates

    Howdy folks! I've got an 800mhz emac. The CRT is shot. I am able to use the external monitor plug. I had (have) an external Mac monitor but it is as big as the emac and I am running out of desk space. I bought a 15" Gateway LCD off a craigslister to

  • Java 2 update causing Safari crashes?

    Hello. I play poker online. Ever since the last Java update, Safari crashes after around 20 mins of starting a game. I've tried using Firefox but it still crashes. I have tried a Safari reset and repaired permissions, but to no avail. I copied the de