Executing script to lowercase uploaded files
Posted: Wed Jul 27, 2011 5:42 pm
We have WingFTP running on linux, we have a script called lc.sh that lowercases whatever file you call at the end of it, the script looks like this:
I pointed to the location of the script under the OnFileUploaded on the Execute program tab but I can't seem to get it to trigger properly.
I've tried adding %FileName to the end of the command, or in the parameters section and nothing happens.
Any ideas on how to get this to work? Or any other ideas on getting it to lowercase all files that are uploaded?
Code: Select all
#!/bin/sh
mv "$1" "`echo "$1" | tr '[A-Z]' '[a-z]'`"
I've tried adding %FileName to the end of the command, or in the parameters section and nothing happens.
Any ideas on how to get this to work? Or any other ideas on getting it to lowercase all files that are uploaded?