General :: Add A File Extension To A Bunch Of File Names?

Oct 20, 2010

I have a considerable number of files in a subdirectory (some fascinating old military clips from archive.org - search on Big Picture if interested). Anyhow, I am downloading them using Internet Download Manager running in an XP virtual machine in VMWare on my Ubuntu 10.04 PC (due to the queuing, restart and speed capabilities of IDM). But I digress - the files are being saved on the host (Samba share) without a file extension. So I have a collection of files with names like

Quote:

The Douglas MacArthur Story
THEY WERE THERE (1960)

I wish to add the extension ".mp4" In Windows this is simply done with the command

Quote:

rename *. *.mp4

This of course does not work in Linux. I have researched the Linux rename command and reviewed a lot of examples. However, I have not found a way to add an extension to a batch of files which are named with no extension to start with. The spaces in the file names also seem to present an issue. At the moment I am renaming them from the Windows VM while they are sitting on the Samba share using the ancient File Manager program from Windows NT which works great on XP. I have experimented with the file rename facility in Gnome Commander however, it does not seem to want to do something so simple.

View 10 Replies


ADVERTISEMENT

Programming :: Rename File Names : Replace Dots By Spaces, Keep The Extension?

Mar 28, 2011

I am trying to rename a lot of files but need to keep the extension :

the files are films names :

a.b.c.d.***.iso

the result should be replacing "." by spaces " "

this command :

for files in *.iso ; do mv "$files" `echo "$files" | tr '.' ' '`; done

put a space also before the extension iso ??

How can I rename files from

"a.b.c.d.iso" to "a b c d.iso"

View 5 Replies View Related

General :: Printing From Bash Shell / Concatenate Files Into One File With File Names Included?

May 11, 2011

I am supposed to take some small files, and print them to a specific printer, such that the small files are concatenated into one file. The file name has to be included in the file that gets printed.

Should I be looking to concatenate the files into one file with the file names included, and then print them?

something like: -printfunction -printername < file*

View 7 Replies View Related

Ubuntu :: File Extension Z - Unix Compressed Archive File?

May 6, 2010

Anyone know how to compress a file to extension z?not tar.gz , zip, 7zip

View 6 Replies View Related

Software :: Rear File Names To Creat A Comma Delimited File?

May 22, 2010

I am looking for an application that will read the file names in a folder and generate a comma delimited file. I want then to import the comma delimited file contests to a spread sheet such as open office.I hava a number of PDF files generated from a scanner, each file with its own scaner generated file name. I want to put these into a data base so I can add the title and other reference information to provide a data base.

View 7 Replies View Related

Ubuntu :: Ext4 File System Hosed After 11 Upgrade (duplicate Directory & File Names)?

May 8, 2011

I recently upgraded to Ubuntu 11 and a few days later my ecryptfs filesystem began misbehaving in a weird way. In my home directory, many subdirectory names are duplicated verbatim. Here's an ls -F excerpt:

Desktop/
Desktop/
Documents/
Documents/
Downloads/
Downloads/

I can no longer access files in those directories (if I ls the directory, it appears empty; I can cd to it, but there's nothing inside). Not all of the directories are duplicated/damaged like this, but most are. A few non-directory files are also duplicated in this fashion, so for example:

[Code]...

View 5 Replies View Related

General :: Accessing .dd File Extension

Mar 2, 2010

I am trying to access a .dd file extension. Do I have to mount it?

VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd
# fdisk -ul VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd
Blocks Id System
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd1 8192 1535999 763904 5 Extended
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd4 * 32 8191 4080 4 FAT16 <32M
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd5 8224 106495 49136 6 FAT16

[Code].....

I am trying to grab some files off this file to create a PXE vmware boot.

View 2 Replies View Related

General :: Match A File Name Without Extension In Csh?

Aug 8, 2011

#!/bin/csh -f
source /xxxx/
set $spicedir = `sim_${1%.*}`
printf "Output folder is %s
" $spicedir
toolcommand -i $1 -o $spicedir
(-o output directory, -i =input)

I got spicedir: Undefined variable in my xterm

How could I match a file name without extension in csh

View 1 Replies View Related

General :: How To Open The File With Extension .pmd

Apr 26, 2010

How will I open a file with extension .pmd in linux ?

View 7 Replies View Related

CentOS 5 Server :: Want To Know File Handles / File Names At NFS Client

Nov 16, 2010

In case that NFS client of fedora is set to cache nfs file handle, where is the cache stored such as /var/lib/nfs?If it's stored in memory instead of directory tree, what command can I know the combination of file names and file handles with?OS in my test environment: Fedora Core 6

View 2 Replies View Related

General :: Unable To Get Basename Of File Without Extension

Mar 4, 2011

Trying to get the basename of a file without the extension, I found this snippet but it just returns command not found twice:

[Code]....

Also tried (with and without the quotes on input and file_ext):

input=$1
file_ext=.${input##*.}
base=`basename "$input" $file_ext`

executed: convert.sh /path/music.wav But it echoes base as music.wav

View 14 Replies View Related

General :: Apache And Php, Force File Extension?

Apr 18, 2011

I am playing with my LAMP server1. why can i access a php file on the server only by typing http://serverip/file with no .php extension on?2. later i tryed to play with .htaccess, but when i uploaded it to the server it just disappeared, why is that

View 4 Replies View Related

General :: Sed Command To Replace File Extension?

Dec 9, 2009

how to use a variable in a sed command, but I can't get the output into a variable.

FILE=readme.txt
now i want to remove the extension of filename
so file woud be:
FILE=readme

my script:

NFILE=`echo $FILE | sed 's/.txt//'`
mv ../out/$FILE ../out/$NFILE
FILE=$NFILE

now when i run my script. i get this unknown character extensions in my new file(NFILE).

View 14 Replies View Related

General :: Compile A Pascal Object File With A .o Extension ?

Mar 27, 2010

I have been trying to compile a pascal file using fpc. I succeeded using the command fpc pas1.pas, but this gave me a new object file pas1.o. How do i compile this file to get my output. gcc -o pas1.o does not work.

View 2 Replies View Related

General :: Using Underscore In File Names?

Apr 4, 2011

I use the command line frequently to navigate my files so I try not to have spaces in file names. Typically I have used an underscore to connect words but it was recently suggested that I should use a dash. Are there any disadvantages to using an underscore in file names?Should I switch to a dash? My system is running Xubuntu and I almost exclusively use the bash shell.

View 4 Replies View Related

General :: Make A Default Application Open A Certain Extension File?

Nov 3, 2010

I know this is possible in GUI gnome. But is it possible to do it too in shell command? Let say if i type this in shell:

#file.txt

then it will open gnome-editor in nautilus which open file.txt. gnome is the desktop manager. nautilus is the explorer windows in gnome. gnome-editor is one like notepad in MS windows.

View 1 Replies View Related

General :: Rename Multiple File By Moving Part Of The Name To End Of Extension?

Aug 26, 2009

How do you rename:

abc123.txt
abc124.txt
abc125.txt

to

abc.txt.123
abc.txt.124
abc.txt.125

Basically, I want to move the digits from the filename to after the extension.

It works for one file if I type:
rename 123.txt .txt.123 abc.txt.123

but I have thousands of files like these.

View 1 Replies View Related

General :: KDE - File Names With Special Characters ?

Feb 20, 2010

I am running gentoo openbox(rox file manager and desktop) I installed Digikam and Amarok. But I have problems with files which include special character in their names(such as �,�, �,ğ... ) The files are shown with strange and weird characters in the file dialogs of Digikam and Amarok.

I don't have this problem in other applications. I can create files with special character included. I think some settings do not agree with KDE4. How can I solve this problem? Does anyone have an idea? I also installed KDE systemsettings program but could not find a relevant config option for character encoding.

View 2 Replies View Related

General :: File And Path Names Of Configurations?

Jul 21, 2011

what is the file and path name of the configuration file to which you would add to the AllowUsers charlie linus lucy?

View 3 Replies View Related

General :: Able To Grep For Names In A File That Contain Foo And Not BlahhFoo?

Feb 1, 2010

I have a number of files:FooBlahhFooI only want to be able to grep for names in a file that contain Foo and not BlahhFoo. However I am not able to pull only those files away. How can this bee done. My grep/zgrep knowledge only goes this far at this point. I'm still learning but I'm stuck on how to make my arguments more precise zgrep 'Foo' SomeFileIMade.gz > /home/user/FOOFILE

View 4 Replies View Related

General :: Move Folders That Contain A File With A Specific Extension To A Destination Folder?

Oct 3, 2010

Many years ago, I converted a portion of my files to an arbitrary format with a specific extension. i no longer desire to have them in this format and i would like begin the process of replacing them because conversion is not an appropriate solution. unfortunately, they are mixed in separate folders of the same root folder with files in my current format of a different extension. I feel it would make this process easier if I were to move every folder that contained a file with the undesired format to a separate root folder. The files are stored on a Linux server and shared via samba. How can I do this with a couple of commands or a script? I am open to other suggestions as well. I want to avoid time spent editing text files. Ultimately, I'd like a command that produced a list of full paths for folders, sorted by the number of levels would be a nice touch. A list of all of the files is clearly not what I'm looking for.

View 2 Replies View Related

General :: Display Only Permissions And File Names Using Ls Command?

Oct 18, 2010

and how to list all files in a directory including full path, owner, group and permissions for each file

View 3 Replies View Related

General :: Any Way To Change Actual File Names Using Amarok?

Jan 9, 2010

I use amarok 2 and I have a lot of files that are titled "Track #.mp3", in Amarok I have changed them to see as the real songs but the actual files are still the same. Is there a way to change the actual file names using amarok to match the tags I have inside of amarok? The reason why I'd want to do this:

1. If my home folder becomes corrupt I don't have to redo 100's of songs (I have a backup but none the less
2. If I ever decide to use another program or if I'm in W7 using Windows Media Player classic it'd be nice to have it recognize the correct files without having to double up on the tag editing

If this isn't possible I'm going to wishlist it because I think it's functional and having a bunch of Track# files is a pain but impossible to get around when you have a lot of mix cd's.

View 2 Replies View Related

General :: How To Change Same File Names Directory Wise

Apr 9, 2010

I have a problem with file names changes. I have a hundred of file with same names and different subdirectories. I want to change that file names by their subdirectery names.

Currently is:
file name------------------------subdirectory name
1_km_16_days_EVI_s2_01200_01200.img --> MOD13A2.A2000049.h23v03.005.dir
1_km_16_days_EVI_s2_01200_01200.img --> MOD13A2.A2000065.h23v03.005.dir
1_km_16_days_EVI_s2_01200_01200.img --> MOD13A2.A2000081.h23v03.005.dir
...

I want to
MOD13A2.A2000049.h23v03.005.img
MOD13A2.A2000065.h23v03.005.img
MOD13A2.A2000081.h23v03.005.img

View 3 Replies View Related

General :: Remove Spaces From Many File Names Under Cygwin?

Nov 22, 2010

I'm hoping that someone can help me, I need to remove spaces (not replace with underscores) from several thousand files on a system with cygwin.
Can I do this from the shell using rename or mv somehow?

View 4 Replies View Related

General :: Regular Expressions Match 2 File Names?

Nov 20, 2010

How can we do a simple match by regular expressions on two filenames. I plan to use it in the command 'find -regex'

Code:
hosts.txt
ipaddress.txt

View 4 Replies View Related

General :: Translate Lowercase File Names To Uppercase?

Nov 26, 2010

Kernel 2.6.21.5, Slackware 12.0

As a result of having mixed files from different filesystems, I have, in directory foo/, files with filenames in uppercase and files with filenames in lowercase. If I want to convert them to all uppercase how do I do it? Consider this will be later recorded into optical discs.

View 7 Replies View Related

Red Hat :: Bunch Of Directories Names Beginning With .gnome In /root

Mar 14, 2011

Bunch of directories beginning with .gnome in /root..

View 1 Replies View Related

General :: Split A Gzip File Based On Size And Have A Prefix Without Changing Extension?

Jan 18, 2010

have a gzip file ABC_000023232.gzipBCD_023232032.gzipI want to split these files into smaller files but keep the extension same because I am using this as a variable in a script

Code:
for i in `ls *.gzip`
split -b 500K $i $i

[code]...

View 3 Replies View Related

General :: Extract To Multiple Directories Based On File Names?

Jan 30, 2009

I'm not sure if this is possible or even where to start. I assume that this can be done with an sh script using tar or similar.I have several very large zip files that contain images for all of the products in my online store. Each image is named after its 13 digit SKU (for example, 9987788000012.jpg). In order to import products into my store, all images are placed into a media directory. Unfortunately, there are over 100,000 images.

So I would like to break the images into sub-folders based on file name. For example, when I extract store_images.zip (or tar or whatever), my extract script would create directories (if they don't already exist) based on the first three digits of each image name, placing each image into the appropriate bottom level directory. For example, "9987788000012.jpg" would be placed in the following directory "media/9/9/8", with media as the root and "8" as the directory that holds any images that start with "998". Perhaps two sub-folders would be less cumbersome.Assuming this requires a script, particularly since it involves scanning image names, creating folders, and saving images to specific directories, which language would serve my needs best? PHP? Has anyone had to do something similar?

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved