Identi.ca Identi.ca
  • Login
  • Public

    • Public
    • Groups
    • Featured
    • Popular

Conversation

Notices

  1. uvok ch337ah uvok ch337ah Linux

    got some files w format screenshot_mmddyyyy_hhmmss.PNG - command to create folder with date (yymmdd) and move files there? !linux

    Monday, 29-Jun-09 19:01:21 UTC from Gwibber
    • Ravi Pinjala Ravi Pinjala

      @uvok quick python script for that: http://pastebin.com/m2d98ec82

      Monday, 29-Jun-09 19:39:27 UTC
      uvok ch337ah likes this.
    • uvok ch337ah uvok ch337ah Ravi Pinjala

      @rxp thanks, but it says SyntaxError: 'return' outside function

      Monday, 29-Jun-09 20:10:34 UTC
    • Ravi Pinjala Ravi Pinjala

      @uvok huh, thats really strange, it worked when I tested it. maybe pastebin messed up the indentation :(

      Monday, 29-Jun-09 20:12:42 UTC
    • uvok ch337ah uvok ch337ah Ravi Pinjala

      @rxp in line 24

      Monday, 29-Jun-09 20:13:25 UTC
    • Ravi Pinjala Ravi Pinjala

      @uvok if you use the download link on the pastebin page, and rename the file to .py, it works

      Monday, 29-Jun-09 20:15:27 UTC
    • uvok ch337ah uvok ch337ah Ravi Pinjala

      @rxp if I want to execute it with ./move_files.py (chmod +x done), it says bash: ./move_files.py: /usr/bin/env: bad interpreter: no permissi

      Monday, 29-Jun-09 20:24:13 UTC
    • uvok ch337ah uvok ch337ah Ravi Pinjala

      @rxp but it works when I run python move_files.py

      Monday, 29-Jun-09 20:24:35 UTC
    • Dave Rankin Dave Rankin

      @uvok one way fwiw: perl -e 'for(`ls screenshot*.PNG`){chomp;($m,$d,$y)=$_=~/_(\d\d)(\d\d)\d\d(\d\d)_/;mkdir "$y$m$d";`mv $_ "$y$m$d"`}'

      Monday, 29-Jun-09 21:03:52 UTC

Site notice

  • API
  • Status

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Identi.ca is a microblogging service brought to you by Status.net. It runs the StatusNet microblogging software, version 1.1.0-alpha1, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Identi.ca content and data are available under the Creative Commons Attribution 3.0 license.

Switch to mobile site layout.

Built in Montreal