|
From: mikeand1 on 3 Feb 2006 23:20 Can someone out there write me a little Perl script? It'd be a dead simple program, and I can pay you for your time and trouble. Basically all it has to do is look at the contents of a directory, and output a text file whose exact contents would depend on the names and numbers of files in that directory. Bonus points if it can do this for multiple subdirectories in a directory. I'll give you the specs for the file if you want to see it before taking on the job. This would be done on a Windows PC (I'd be working from DOS I suppose.) Anyone? This would probably take 10 minutes for a decent programmer to write, I suppose, but I'll pay $50, or whatever it's worth to you, within reasonable limits depending on how hard it is to do. Thanks, Mike
From: usenet on 3 Feb 2006 23:22 mikea...(a)comcast.net wrote: > Can someone out there write me a little Perl script? It'd be a dead > simple program, and I can pay you for your time and trouble. http://jobs.perl.org is that way -> This is a place where free advice is offered to people who are trying to learn or use Perl. -- http://DavidFilmer.com
From: J?rgen Exner on 4 Feb 2006 00:46 mikeand1(a)comcast.net wrote: > Can someone out there write me a little Perl script? It'd be a dead > simple program, and I can pay you for your time and trouble. > > Basically all it has to do is look at the contents of a directory, perldoc -f opendir perldoc -f readdir > and > output a text file > perldoc -f open > whose exact contents would depend on the names and > numbers of files in that directory. perldoc -f print > Bonus points if it can do this for > multiple subdirectories in a directory. I'll give you the specs for perldoc -f File::Find jue
From: mikeand1@comcast.net on 4 Feb 2006 01:12 It's a little more complicated than that: You can assume the directory is called DirectoryName, and contains files of only two types: .txt files, and .tif files. The directory will contain files something like this: FileName1.txt FileName1.tif FileName2.txt FileName2.tif FileName3.tif FileName4.tif FileName5.txt FileName5.tif FileName6.tif FileName7.tif FileName8.tif There is always a .txt file associated with one or more .tif files. For example, FileName1.txt is obviously associated with FileName1.tif. But there are three .tif files associated with FileName2.txt: FileName2.tif, FileName3.tif, and FileName4.tif. And there are four .tif files associated with FileName5.txt: FileName5.tif, FileName6.tif, FileName7.tif, and FileName8.tif The name of a .txt file always corresponds exactly to the name of the first .tif file associated with it (excepting for the file extension, of course). There can be any number of .tif files associated with a .txt file. You can assume the .tif files associated with a .txt file are always numbered in sequence, starting with the number of the .txt file. However, you should assume that the number of .tif files associated with a .txt file increases with the number of .txt files, as in my example. The first .txt file might have five .tif files with it, the second .txt file might have only one .tif file associated with it, and so on. The outputted text file should have the following format for the above group of files: @FULLTEXT DOC ; Record 1 @C BEGDOC# FileName1 @C ENDDOC# FileName1 @C PGCount 1 @T FileName1 @D @I\DirectoryName\ FileName1.tif ; Record 2 @C BEGDOC# FileName2 @C ENDDOC# FileName4 @C PGCount 3 @T FileName2 @D @I\DirectoryName\ FileName2.tif FileName3.tif FileName4.tif ; Record 3 @C BEGDOC# FileName5 @C ENDDOC# FileName8 @C PGCount 4 @T FileName5 @D @I\DirectoryName\ FileName5.tif FileName6.tif FileName7.tif FileName8.tif You can see that after BEGDOC#, you put the file name corresponding to the first .tif file that corresponds to a .txt file, and after ENDDOC#, you put the name of the last .tif file corresponding to that .txt file. After PGCount, you put the number of .tif files that correspond to that .txt file. After @T, you put the name of the .txt file (minus the extension). And then below the @D file, you list all the .tif files that correspond to that .txt file. There can be any number of .txt files, sometimes quite large, and any (nonzero) number of .tif files associated with each .txt file. The outputted text file should be called DirectoryName.dii where DirectoryName is the name of the directory holding the files, as above. That's it. I have a large number of directories to process in this manner, so if you want to build a script that automatically searches for subdirectories containing files like this, and creates a .dii file for each such subdirectory, that'd be even better.
From: mikeand1@comcast.net on 4 Feb 2006 01:13 OK, I posted it there too. Thanks, Mike
|
Next
|
Last
Pages: 1 2 3 4 Prev: FAQ 4.7 How do I multiply matrices? Next: Morse code audio playout? |