Syntax for output filenames


 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Syntax for output filenames
# 1  
Old 10-20-2010
Network Syntax for output filenames

Hello to everybody...

I have spent very long time on this before I decided to sign up in this forum.
Maybe I've just not used the right keywords. I have to say that I'm not a programmer or something like that...

I've been playin' around a little with ImageMagick and I would like to have multiple files (in one folder) being processed and saved with their original filename to a subfolder.

In 'Terminal' I used the following command:

convert <options> *.png subfolder/???????????

I have no idea what syntax I have to use, to keep the original filenames.

I've tried *, *.*, and many more but wasn't successful.

Anyone an idea?

Thanks in advance
Ralf
# 2  
Old 10-20-2010
Code:
ls *.png | while read a
do
convert <options> $a subfolder/${a##*/}
done

# 3  
Old 10-20-2010
wow... thanx so much. works smooth... you made my day Smilie
# 4  
Old 10-21-2010
by the way... also got a different way:

convert *.png <options> -set filename:base '%[base]' 'subfolder/%[filename:base].png'

maybe interesting for you Smilie

cheers
ralf
# 5  
Old 10-21-2010
Lol i don't need it but maybe some other do !
Thx for them
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Naming output files based on variable parameters and input filenames

Hello, I have a series of files in sub-directories that I want to loop through, process and name according to the input filename and the various parameters I'm using to process the files. I have a number of each, for example file names like AG005574, AG004788, AG003854 and parameter values like... (2 Replies)
Discussion started by: bdeads
2 Replies

2. UNIX for Dummies Questions & Answers

Create csv with output filenames and file size

Hello All, Here is seeking a bit of help in trying to solve a problem. I am required to create a csv file as shown below: output.csv -> output_1,output_2,output_3,...,output_<N> filename1:20,filename2:30,filename3:30,...,filename<N>:30 by listing output_1, output_2,... , output<N> as... (3 Replies)
Discussion started by: vkumbhakarna
3 Replies

3. UNIX for Dummies Questions & Answers

Dot and redirected output syntax in a tar command

Hi All, Please could anyone advise what the purpose of the dot syntax in the following command means: tar -cvf ${WORKING_BACKUP_ROOT}/${TAR_ARCHIVE_FILE} . >/${BACKUP_ROOT}/${ARCHIVE_LOG} Many thanks (2 Replies)
Discussion started by: daveu7
2 Replies

4. Shell Programming and Scripting

awk syntax mistake doubles desired output

I am trying to add a line to a BASH shell script to print out a large variable length table on a web page. I am very new to this obviously, but I tried this with awk and it prints out every line twice. What I am doing wrong? echo "1^2^3%4^5^6%7^8^9%" | awk 'BEGIN { RS="%"; FS="^"; } {for (i =... (6 Replies)
Discussion started by: awknewb123
6 Replies

5. Shell Programming and Scripting

For loop with dashes in filenames causing weird output

Hi again, What i'm trying to accomplish here is search a large directory for certain filesames, read from a txt file and looping through it. For instance, one of my target names from the loop file is: 1ad55f47-c342-496b-a46d-ba7de0f1b434 My loop is constructed thusly, run in a directory... (2 Replies)
Discussion started by: Karunamon
2 Replies

6. Shell Programming and Scripting

Extract variables from filenames and output to file

I need some help. I have a list of files (thousands) and would like to extract some variables from the file name and save that to a file The list of files look like: I am trying to write the following script but I am stuck at how I can get thevariables 'doy' and 'yr' from each file and then... (5 Replies)
Discussion started by: malandisa
5 Replies

7. Shell Programming and Scripting

problem with print append to output file syntax

I'm trying to output the contents of the infile to the outfile using Append. I will want to use append but the syntax doesn't seem to be working ! Input file (called a.txt) contains this: a a a b b b I'm running shell script (called k.sh) from Unix command-line like this: ./k.sh .... (1 Reply)
Discussion started by: script_op2a
1 Replies

8. Shell Programming and Scripting

Script for a syntax output for a table.

Hello Unix Gurus, I need a few instuructions how to approach the following scenarios.For a given TABLENAME a script should display the following structure on the screen.The structure should be as below.for a given perticular table. SELECT *FROM TAB1 a JOIN TAB1 b ON ... (0 Replies)
Discussion started by: kanakaraju
0 Replies

9. UNIX for Dummies Questions & Answers

renaming filenames

I have 7 files with 7 different names coming into a specified folder on weekly basis, i need to pick a file one after another and load into oracle table using sql loader. I am using ksh to do this. So in the process if the file has error records and if sql loader fails to load into oracle tables,... (0 Replies)
Discussion started by: vpv0002
0 Replies

10. Shell Programming and Scripting

No Syntax Error and No Output

Hello All, this script should use the command who, to log the Full Name, Date, and IP Address of the users who are connected to the system in a file called logfile. Excluding the user running the script. the output in the log file is also sorted, id like to think my scripting is logical, but... (15 Replies)
Discussion started by: ibzee33
15 Replies
Login or Register to Ask a Question