Visit Our UNIX and Linux User Community

Top Forums Shell Programming and Scripting Script to order my video library :-) Post 302850665 by rjalex on Thursday 5th of September 2013 10:08:42 AM
Old 09-05-2013
Script to order my video library :-)

Dear friends,
I have a hundred or so videos I keep in a directory, but as the collection has grown anarchically in the past years I have at least 3 different situations:

a) one directory for each video and within it the video and any other accompaining files (mostly text files with my notes and reviews). This is the desired end state for all of them

b) a single movie file sitting in the top directory (extensions can be flc, mkv, avi,mpg etc.). These I would like to move into a directory with the same name as the file

c) single non-movie files. these I'd ignore for now.

Thanks for any help.
Test Your Knowledge in Computers #85
Difficulty: Easy
Windows 7, Windows 8, Windows RT, Windows Phone 8, Windows Server, and the Xbox One's operating system all used the Windows NT kernel.
True or False?

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing the order of columns in a script

I have the following script: (echo -n `curl | grep mylocation`; date +%Y%m%d%H%M%S) >> myscores.txt This script works fine, except that it places the timestamp at the end of the file myscores.txt. How do add the timestamp as the first column and then a tab and... (4 Replies)
Discussion started by: figaro
4 Replies

2. Linux

USB video capture? composite, s-video, etc

does anybody have any experience with any of these composite video to usb devices on linux? usb video capture - Google Product Search would like to get one but a linux newbie and having trouble figuring out if any are ported... i've found lots of things that link to DisplayLink... (1 Reply)
Discussion started by: danpaluska
1 Replies

3. UNIX for Advanced & Expert Users

Video Cards :: Video Memory Intercept and Redirect

I need a broad spectrum understanding on this subject, and any help would be greatly appreciated. First of all, as I understand it... The way the video hardware works is the CPU sends information about input and possible changes to the display, the video card receives these changes, makes the... (2 Replies)
Discussion started by: ciNG
2 Replies

4. Shell Programming and Scripting

script for remove descending order number

hi all i want to remove some descending order number example : 1 100 200 135.00 Gk_wirs 1 1 100 200 136.00 Gk_wirs 50 1 110 210 138.00 Gk_wirs 60 1 100 200 136.00 Gk_wirs 57 ----> how to remove... (6 Replies)
Discussion started by: nithyanandan
6 Replies

5. Shell Programming and Scripting

Script to solve second order (polynomial) interpolation

Currently I have awk command to do linear interpolation awk ' { P=$2 I=$1 } END { j=0; s=I; t=I for(i=m;i<=n;i++) { if(I && i>t) { j++; s=I; t=I } print i, P+(i-s)*(P-P)/(t-s) } } ' m=1 n=8 infile FILE CONTENT... (8 Replies)
Discussion started by: Tzeronone
8 Replies

6. Shell Programming and Scripting

Script Execution Order

Hi, I have two scripts which are mentioned in more ./ //line 1 should not return error ./ //line 2 may return error ./ //line 3 should not return error Condition: I want to complete before starting (1 Reply)
Discussion started by: mohtashims
1 Replies
WebService::YouTube::Videos(3pm)			User Contributed Perl Documentation			  WebService::YouTube::Videos(3pm)

WebService::YouTube::Videos - Perl interface to youtube.videos.* VERSION
This document describes WebService::YouTube::Videos version 1.0.3 SYNOPSIS
use WebService::YouTube::Videos; my $api = WebService::YouTube::Videos->new( { dev_id => YOUR_DEV_ID } ); # Call API youtube.videos.list_featured my @videos = $api->list_featured; foreach my $video (@videos) { # $video->isa('WebService::YouTube::Video'); } # Call other APIs my @videos = $api->list_by_user($user); my @videos = $api->list_by_tag($tag); my $video = $api->get_details($video_id); # Parse XML my @video = $api->parse_xml($xml); # when $xml contains <video_list> my $video = $api->parse_xml($xml); # when $xml contains <video_details> DESCRIPTION
This is a Perl interface to YouTube REST API. See Developer APIs <> and Developer API -- REST Interface <> for details. SUBROUTINES
/METHODS new(\%fields) Creates and returns a new WebService::YouTube::Videos object. %fields can contain parameters enumerated in "ACCESSORS" section. parse_xml($xml) Parses XML and returns the result. $xml should be an object that XML::Simple can understand. get_details( $video_id ) Returns a WebService::YouTube::Video object. $video_id is an ID of the video which you want to get details. See <> for details. list_by_tag( $tag, \%fields ) Returns an array of WebService::YouTube::Video object. $tag is a keyword string separated by a space. %fields can contain the optional parameters. page 1 <= page per_page per_page <= 100 (default 20) See <> for details. list_by_user( $user ) Returns an array of WebService::YouTube::Video object. $tag is a keyword string separated by a space. %fields can contain optional parameters. See <> for details. list_featured( ) Returns an array of WebService::YouTube::Video object. See <> for details. ACCESSORS dev_id Developer ID ua LWP::UserAgent object DIAGNOSTICS
dev_id is required Developer ID is required when you call API of YouTube. invalid XML The XML is not a YouTube's XML. unknown response The ut_response is neither <video_list> nor <video_details>. CONFIGURATION AND ENVIRONMENT
WebService::YouTube::Videos requires no configuration files or environment variables. DEPENDENCIES
Class::Accessor::Fast, LWP::UserAgent, XML::Simple, WebService::YouTube::Util, WebService::YouTube::Video INCOMPATIBILITIES
No bugs have been reported. Please report any bugs or feature requests to "", or through the web interface at <>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. AUTHOR
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. perl v5.10.1 2010-08-01 WebService::YouTube::Videos(3pm)

Featured Tech Videos

All times are GMT -4. The time now is 07:33 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy