Sponsored Content
Full Discussion: Changing file extension
Top Forums UNIX for Dummies Questions & Answers Changing file extension Post 302434483 by jaysean on Friday 2nd of July 2010 06:41:34 PM
Old 07-02-2010
thanks...works for me
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Lynx - Downloading - extension handling - changing mime type?

Using Lynx, when I try to download a .rar, it confirms I want to download and its got it as an appication/rar file. However, split archives that end in .r## (.r00, .r01 ...) are not recognized as an appication/rar file and it reads the file like a .txt or .html. How can I fix this? Thanks! (2 Replies)
Discussion started by: yitzle
2 Replies

2. Shell Programming and Scripting

Changing extension

Hi , I need to replace the file name extension with txt to csv,i wrote the below script when executing its giving the below error.Please anyone how to do this? $ a2.sh mv: *.: cannot access: No such file or directory ./a2.sh: o: bad number $ vi a2.sh a2.sh ----- #!/bin/ksh txt=$1... (4 Replies)
Discussion started by: mohan705
4 Replies

3. UNIX for Dummies Questions & Answers

Changing the extension of the file

I have a list of files in a particular folder Example: File name - sample.F1.test I want to change the extension of the above file to .csv The final file should be renamed as sample.csv (4 Replies)
Discussion started by: mazhar803
4 Replies

4. Shell Programming and Scripting

changing filename extension

Hi All, i need to change the filename extension. For simplicity, we can assume that the extension after '.' is 3 characters only... but the filenames can vary. eg. changing from abc.doc to abc.dxs can i have a oneline command to achieve this (3 Replies)
Discussion started by: Hiso
3 Replies

5. UNIX for Dummies Questions & Answers

changing file extension

Hello, everyone! :] I'm having an issue with my camera/uploading to Photobucket. When my camera transfers it's photos to my hard drive, it transfers them as .JPG. Unfortunately, when I go to upload to my Photobucket account, it only accepts .jpg & .jpeg files. Every time I want to upload, I... (6 Replies)
Discussion started by: spidydude
6 Replies

6. UNIX for Dummies Questions & Answers

creating separate directories according to file extension and keeping file in different directory as

unix program to which a directory name will be passed as parameter. This directory will contain files with various extensions. This script will create directories with the names of the extention of the files and then put the files in the corresponding folder. All files which do not have any... (2 Replies)
Discussion started by: Deekay.p
2 Replies

7. UNIX for Dummies Questions & Answers

Rename multiple files, changing prefix, extension and dropping characters

I'm currently only able to perform some very basic functions, so hope this makes sense... I have a set of about 27 files that need to be renamed from something like this: 000012ABCDEFGHIJ.XXX.YYY.ZZZ 000078KLMNO.XXX.YYY.ZZZ 000099PQ.XXX.YYY.ZZZ to something like this: newa012.abc... (11 Replies)
Discussion started by: bbmcg
11 Replies

8. Shell Programming and Scripting

Changing file extension in csh alias

I want to type only the filename of a gcc source that has ".syn" as an extension and copy it, changing the extension to ".c" so it can be compiled. I do it as follows: if (-e $1.syn) then /bin/cp $1.syn $1.c endif This works fine, but if I want to repeat the compilation by... (1 Reply)
Discussion started by: ygmwayne
1 Replies

9. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

Hi All, I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing. 1.I need to display the .done files from the directory. 2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory ... (2 Replies)
Discussion started by: girija.g6
2 Replies

10. Debian

Changing file extension names

Hi I have a list of files :root@L28mustang:/var/log/exim4/2017/Jul2017_Blast_BC07# ls -lrt | grep mainlog -rw-r----- 1 Debian-exim adm 3636932 Jul 8 06:25 mainlog.3.gz -rw-r----- 1 Debian-exim adm 919512 Jul 9 06:27 mainlog.2.gz -rw-r----- 1 Debian-exim adm 7655054 Jul 10 06:25 mainlog.1... (1 Reply)
Discussion started by: anaigini45
1 Replies
The folder management API.(3)					      libmtp					     The folder management API.(3)

NAME
libmtp - The folder management API. Functions LIBMTP_folder_t * LIBMTP_new_folder_t (void) void LIBMTP_destroy_folder_t (LIBMTP_folder_t *) LIBMTP_folder_t * LIBMTP_Get_Folder_List (LIBMTP_mtpdevice_t *) LIBMTP_folder_t * LIBMTP_Get_Folder_List_For_Storage (LIBMTP_mtpdevice_t *, uint32_t const) LIBMTP_folder_t * LIBMTP_Find_Folder (LIBMTP_folder_t *, uint32_t const) uint32_t LIBMTP_Create_Folder (LIBMTP_mtpdevice_t *, char *, uint32_t, uint32_t) int LIBMTP_Set_Folder_Name (LIBMTP_mtpdevice_t *, LIBMTP_folder_t *, const char *) Detailed Description Function Documentation uint32_t LIBMTP_Create_Folder (LIBMTP_mtpdevice_t *device, char *name, uint32_tparent_id, uint32_tstorage_id) This create a folder on the current MTP device. The PTP name for a folder is 'association'. The PTP/MTP devices does not have an internal 'folder' concept really, it contains a flat list of all files and some file are 'associations' that other files and folders may refer to as its 'parent'. Parameters: device a pointer to the device to create the folder on. name the name of the new folder. Note this can be modified if the device does not support all the characters in the name. parent_id id of parent folder to add the new folder to, or 0 to put it in the root directory. storage_id id of the storage to add this new folder to. notice that you cannot mismatch storage id and parent id: they must both be on the same storage! Pass in 0 if you want to create this folder on the default storage. Returns: id to new folder or 0 if an error occured References DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST, LIBMTP_mtpdevice_struct::params, strip_7bit_from_utf8(), and LIBMTP_mtpdevice_struct::usbinfo. void LIBMTP_destroy_folder_t (LIBMTP_folder_t *folder) This recursively deletes the memory for a folder structure. This shall typically be called on a top-level folder list to detsroy the entire folder tree. Parameters: folder folder structure to destroy See Also: LIBMTP_new_folder_t() References LIBMTP_folder_struct::child, LIBMTP_destroy_folder_t(), LIBMTP_folder_struct::name, and LIBMTP_folder_struct::sibling. Referenced by LIBMTP_destroy_folder_t(), and LIBMTP_Get_Folder_List_For_Storage(). LIBMTP_folder_t* LIBMTP_Find_Folder (LIBMTP_folder_t *folderlist, uint32_tid) Helper function. Returns a folder structure for a specified id. Parameters: folderlist list of folders to search id of folder to look for Returns: a folder or NULL if not found References LIBMTP_folder_struct::child, LIBMTP_folder_struct::folder_id, LIBMTP_Find_Folder(), and LIBMTP_folder_struct::sibling. Referenced by LIBMTP_Find_Folder(). LIBMTP_folder_t* LIBMTP_Get_Folder_List (LIBMTP_mtpdevice_t *device) This returns a list of all folders available on the current MTP device. Parameters: device a pointer to the device to get the folder listing for. Returns: a list of folders References LIBMTP_Get_Folder_List_For_Storage(). LIBMTP_folder_t* LIBMTP_Get_Folder_List_For_Storage (LIBMTP_mtpdevice_t *device, uint32_t conststorage) This returns a list of all folders available on the current MTP device. Parameters: device a pointer to the device to get the folder listing for. storage a storage ID to get the folder list from Returns: a list of folders References LIBMTP_folder_struct::child, LIBMTP_folder_struct::folder_id, LIBMTP_destroy_folder_t(), LIBMTP_new_folder_t(), LIBMTP_folder_struct::name, LIBMTP_mtpdevice_struct::params, LIBMTP_folder_struct::parent_id, LIBMTP_folder_struct::sibling, and LIBMTP_folder_struct::storage_id. Referenced by LIBMTP_Get_Folder_List(). LIBMTP_folder_t* LIBMTP_new_folder_t (void) This creates a new folder structure and allocates memory for it. Notice that if you add strings to this structure they will be freed by the corresponding LIBMTP_folder_track_t operation later, so be careful of using strdup() when assigning strings, e.g.: Returns: a pointer to the newly allocated folder structure. See Also: LIBMTP_destroy_folder_t() References LIBMTP_folder_struct::folder_id. Referenced by LIBMTP_Get_Folder_List_For_Storage(). int LIBMTP_Set_Folder_Name (LIBMTP_mtpdevice_t *device, LIBMTP_folder_t *folder, const char *newname) This function renames a single folder. This simply means that the PTP_OPC_ObjectFileName property is updated, if this is supported by the device. Parameters: device a pointer to the device that contains the file. folder the folder metadata of the folder to rename. On success, the name member is updated. Be aware, that this name can be different than newname depending of device restrictions. newname the new name for this object. Returns: 0 on success, any other value means failure. References LIBMTP_folder_struct::folder_id, and LIBMTP_folder_struct::name. Author Generated automatically by Doxygen for libmtp from the source code. Version 1.1.3 Sun Feb 17 2013 The folder management API.(3)
All times are GMT -4. The time now is 09:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy