-
All replies
-
Helpful answers
-
Oct 18, 2015 1:25 PM in response to williamleonby Tony T1,1st post a few lines of what's in the file "statestudentnumberonly"
Then the 2nd step is to debug using echo.
Change
mv "$OldImageName" "Desktop/NEWFOLDER/$NewImageName"
to
echo mv "$OldImageName" "Desktop/NEWFOLDER/$NewImageName" >> $HOME/Desktop/debug.txt
and post a few lines of what you see in the debug.txt file created on the Desktop
-
Oct 18, 2015 1:37 PM in response to Tony T1by williamleon,It ran through without giving me an error but not able to locate any files who's names have been changed.
-
Oct 18, 2015 1:46 PM in response to williamleonby Tony T1,Without seeing a few lines of the input file or what echo is showing as the output command, there's not a lot I can do, sorry.
-
Nov 2, 2015 4:38 AM in response to Tony T1by vnylund,Hi Tony!
Sorry to be picking up this issue again, but I've been reading through the whole thread and after a while it's gets messy. I lost track of which step I should follow in order for it to work after trying several steps and changing back and forth of the AppleScript etc.
If it's not too much to ask I would love some further help from scratch.
I've created the .csv file and placed all images in a folder - How and where should I place these files?
And what script am I supposed to write in the last step for the Shell Script? Please write the full code with clear marks where and what I need to change.
As I've been trying several steps mentioned earlier in this thread the closest I've come in order for it to work is that the script runs without errors but nothing happens to the file names...
Note that I have zero experience from using these tools in OS X so please use a language that I can understandThank you very much in advance!
(Sorry about the Swedish language in screenshot!)
-
Nov 3, 2015 6:04 AM in response to vnylundby Tony T1,vnylund wrote:
I've created the .csv file and placed all images in a folder - How and where should I place these files?
The CSV file and the images don't need to be in the same Folder as the Script will ask for the CSV file and then will ask for the Folder with the images.
Looks like what you posted should work, but, if as its not, please edit the script as follows (this is for debugging purposes):
change:
mv "$OldImageName" "$NewImageName"
to:
echo mv "$OldImageName" "$NewImageName" >> $HOME/Desktop/debug.txt
then post a few lines of what's in the debug.txt file that's created on the Desktop.
-
-
Nov 3, 2015 6:28 AM in response to vnylundby Mark Jalbert,Note: the following line is missing the $ in the HOME variable and the quotes are unbalanced. The script will fail.
echo "$OldImageName >> "HOME/Desktop/MissingFiles.txt"
should be
echo "$OldImageName" >> "$HOME/Desktop/MissingFiles.txt"
-
Nov 3, 2015 6:44 AM in response to Mark Jalbertby vnylund,Mark,
Thanks for your feedback.
I made your requested change and also moved some files according to the script (I did some thinking of my own).
So the script runs without errors now but it doesn't generate the change of the files names... So it runs the script but nothing happens.
Please see attached screenshot.
Thanks in advance for your further assistance!
-
Nov 3, 2015 6:56 AM in response to vnylundby Tony T1,vnylund wrote:
I made your requested change and also moved some files according to the script (I did some thinking of my own).
So the script runs without errors now but it doesn't generate the change of the files names...
So it runs the script but nothing happens
The change was for debugging purposes, not to move files.
There should be a file on your Desktop named "debug,txt", please post a few lines from that file.
-
Nov 3, 2015 7:05 AM in response to Tony T1by vnylund,Tony,
You are referring to my answer to Marks post. Please my answer to your post above.
I made your change in the script but no .txt file was generated on my desktop. So I can't provide you with the data you're asking for, sorry!
-
Nov 3, 2015 7:14 AM in response to vnylundby Tony T1,vnylund wrote:
Tony,
You are referring to my answer to Marks post. Please my answer to your post above.
I made your change in the script but no .txt file was generated on my desktop. So I can't provide you with the data you're asking for, sorry!
ok, first get the script back to where it was.
change:
echo mv "$OldImageName" "$NewImageName" >> $HOME/Desktop/debug.txt
to:
mv "$OldImageName" "$NewImageName"
Now, before the if statement, add:
echo mv "$OldImageName" "$NewImageName" >> $HOME/Desktop/debug.txt
Is there a debug.txt file created on the Desktop now?
-
-
Nov 3, 2015 7:34 AM in response to vnylundby Tony T1,I see now that you hard-coded the folder as the Documents Folder (sorry, I missed that before).
In this case, then both the CSV file and the images need to be in the Documents Folder (and also the only Automator Action needed is the Run Shell Script Action).
-
-
Nov 3, 2015 7:48 AM in response to vnylundby Tony T1,>vnylund wrote:
>I see.
>Tried to make it work but same problem still occurs.
>The script runs without any problems but the action is not generated so the names of files is not being changed...
Can you post a few lines of the CSV file?





