Re: What language to manipulate text files



ross <rossnixon@xxxxxxxxx> writes:

> What are the ideal languages for the following examples?
>
> 1. Starting from a certain folder, look in the subfolders for all
> filenames matching *FOOD*.txt Any files matching in each folder should
> be copied to a new subfolder within the current folder called EATING
> with a new name of *FOOD*COPY.txt

Bash?

for f in *FOOD*.txt; do cp ${f} EATING/${f}COPY.txt; done

Or "mmv", a linux utility:

mmv '*FOOD*.txt' 'EATING/#1FOOD#2COPY.txt'

For the rest, I personally for choose python.

Dan
.



Relevant Pages

  • RE: Disappearing Network Share Subfolders
    ... Thank you for posting to the SBS Newsgroup. ... I understand that some of your Windows XP SP2 clients cannot view the ... subfolders in share folders on SBS 2K Server. ... Does the problematic share folder locate at NTFS or FAT32 disk? ...
    (microsoft.public.windows.server.sbs)
  • Re: Read path from text file to process directory structure
    ... Public Function fGetFolder(sFolderName As String) ... Dim FoldersArray As Variant ... 'Read all subfolders of the specified folder into an array ... 'The following string will contain the path of the folder which is currently ...
    (microsoft.public.word.vba.general)
  • Re: NTFS Permissions Question
    ... Answer is, modify includes delete, but not delete subfolders and files. ... subfolder(s) when delete is not inherited from the parent folder. ... with just the permission you need. ...
    (microsoft.public.cert.exam.mcse)
  • File Server NTFS Permissions question
    ... have 3 subfolders that are not shares, ... Share permissions to the 'Shares' share are: ... Users will see a list of department folders when browsing to the K:\. ... Folder / Execute File | List Folder / Read Data ...
    (microsoft.public.windows.server.active_directory)
  • Re: Cant bring up an arbitrary contact from my contact subfolders
    ... Outlook's search/find features are designed for use in the Contact Folder ... > To find receipient #1, I would normally need to navigate through my ... please recall I do have many subfolders several ... >>>> Folder after you have already selected the recipient. ...
    (microsoft.public.outlook.contacts)