|
Replies:
13
-
Pages:
1
-
Last Post:
28 Sep 22, 13:04
Last Post By: AndreWolff
|
Threads:
[
Previous
|
Next
]
|
|
Posts:
699
Registered:
13-Apr-2006
|
|
|
Copy file to output folder, how to?
Posted:
27 Sep 22, 18:41
|
|
|
Hi,
is there a way to copy a file (in this case "points.js") from a picture folder (the source) to the output folder?
Source file (lying in the folder with the pictures included in the project):
D:\Eigene Dateien\MDrück\Pictures\2022 03 01 Norge\2022 03 01 Hahnstätten - Malmö\points.js
D:\Eigene Dateien\MDrück\Pictures\2022 03 01 Norge\2022 03 02 Malmö - Sunne\points.js
D:\Eigene Dateien\MDrück\Pictures\2022 03 01 Norge\2022 03 03 Sunne - Östersund\points.js
...
Output folder:
F:\My Albums\Master\Norge, Sverige, Danmark, Suomi\2022 03 01 Norge\2022 03 01 Hahnstätten - Malmö
F:\My Albums\Master\Norge, Sverige, Danmark, Suomi\2022 03 01 Norge\2022 03 02 Malmö - Sunne
F:\My Albums\Master\Norge, Sverige, Danmark, Suomi\2022 03 01 Norge\2022 03 03 Sunne - Östersund
...
And these files, of course, should also be uploaded.
I actually need the files where the "index.html" of a folder is.
Thanks.
|
|
|
Posts:
3,651
Registered:
18-Oct-2002
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 19:14
in response to: MarkusD
|
|
|
Sure. IO.copyFile does the job
|
|
|
Posts:
699
Registered:
13-Apr-2006
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 19:28
in response to: davidekholm
|
|
|
Just assume I would be able to implement (maybe again with the big assistance from Rob <g>) a tool to copy the file to the output folder. Would that mean that when JA uploads all files to my server that these files would get uploaded automatic? Thanks.
|
|
|
Posts:
1,156
Registered:
14-Dec-2007
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 21:03
in response to: MarkusD
|
|
|
is there a way to copy a file (in this case "points.js") from a picture folder (the source) to the output folder?
In my skins are all files in an "out" folder in the image directory automatically copied to the output folder in a Make action.
I did ask for a general solution, see this thread, but that has been refused.
Edited by: RobM on 27 Sep 2022, 20:56
fixed link
|
|
|
Posts:
3,651
Registered:
18-Oct-2002
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 21:31
in response to: MarkusD
|
|
|
Just assume I would be able to implement (maybe again with the big assistance from Rob <g>) a tool to copy the file to the output folder. Would that mean that when JA uploads all files to my server that these files would get uploaded automatic? Thanks.
Yes, jAlbum simply uploads the contents of the output folder to the designated folder on the server
|
|
|
Posts:
699
Registered:
13-Apr-2006
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 21:35
in response to: davidekholm
|
|
|
Just assume I would be able to implement (maybe again with the big assistance from Rob <g>) a tool to copy the file to the output folder. Would that mean that when JA uploads all files to my server that these files would get uploaded automatic? Thanks.
Yes, jAlbum simply uploads the contents of the output folder to the designated folder on the server
Brilliant. So, my idea is, to just write one (Windows) batch file, which copies just all the files affected to the corresponding output folders, and I'm done. Thanks.
|
|
|
Posts:
3,651
Registered:
18-Oct-2002
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 22:02
in response to: MarkusD
|
|
|
Brilliant. So, my idea is, to just write one (Windows) batch file, which copies just all the files affected to the corresponding output folders, and I'm done. Thanks.
Sure you can do that, but isn't that akward when you can use either Java, Groovy, BeanShell or JavaScript to copy those files automatically during album build. Just add a predir or postdir script to the skin you use and add 4 IO.copyFile statements to it.
|
|
|
Posts:
3,950
Registered:
4-Aug-2006
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 22:05
in response to: MarkusD
|
|
|
Just assume I would be able to implement (maybe again with the big assistance from Rob <g>) a tool to copy the file to the output folder. Would that mean that when JA uploads all files to my server that these files would get uploaded automatic? Thanks.
Yes, jAlbum simply uploads the contents of the output folder to the designated folder on the server
Brilliant. So, my idea is, to just write one (Windows) batch file, which copies just all the files affected to the corresponding output folders, and I'm done. Thanks.
I could code the tool to copy the files to the output directories, if you want. It is not as straightforward as the linked post suggests because it is in a tool not in a script used during album build.
|
|
|
Posts:
7,926
Registered:
31-Jan-2006
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 22:27
in response to: davidekholm
|
|
|
Sure you can do that, but isn't that akward when you can use either Java, Groovy, BeanShell or JavaScript to copy those files automatically during album build. Just add a predir or postdir script to the skin you use and add 4 IO.copyFile statements to it.
A little tricky in this case because he's using Tiger. There's a predir.js, but no postdir.js. So, easy enough to add a postdir.js - and doing it in "pre" might be problematic (when does the output dir get created?).
I could give him the lines in a postdir.bsh or postdir.groovy, but it would probably take some trial and error to do it in Javascript. 
|
|
|
Posts:
1,156
Registered:
14-Dec-2007
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 22:36
in response to: JeffTucker
|
|
|
A little tricky in this case because he's using Tiger.
That’s why I did ask to implement my out folder concept in The jAlbum part, because in that case it works for all skins.
David may be you should consider it again!
|
|
|
Posts:
699
Registered:
13-Apr-2006
|
|
|
Re: Copy file to output folder, how to?
Posted:
27 Sep 22, 22:41
in response to: davidekholm
|
|
|
Brilliant. So, my idea is, to just write one (Windows) batch file, which copies just all the files affected to the corresponding output folders, and I'm done. Thanks.
Sure you can do that, but isn't that akward when you can use either Java, Groovy, BeanShell or JavaScript to copy those files automatically during album build. Just add a predir or postdir script to the skin you use and add 4 IO.copyFile statements to it.
David, I have to be realistic, I don't speak any Italian (Java), Spanish (Groovy), Hungarian (BeanShell) and only a little bit of JavaScript.
So the good old method with a batch file seemed to be a reasonable workaround. I already started to write it, but indeed, this will be a mess... I have to think about this...
|
|
|
Posts:
3,950
Registered:
4-Aug-2006
|
|
|
Re: Copy file to output folder, how to?
Posted:
28 Sep 22, 00:23
in response to: MarkusD
|
|
|
So the good old method with a batch file seemed to be a reasonable workaround. I already started to write it, but indeed, this will be a mess... I have to think about this...
As posted in the other place, try the new tool which copies the .js file to the output directory.
|
|
|
Posts:
3,651
Registered:
18-Oct-2002
|
|
|
Re: Copy file to output folder, how to?
Posted:
28 Sep 22, 10:15
in response to: AndreWolff
|
|
|
A little tricky in this case because he's using Tiger.
That’s why I did ask to implement my out folder concept in The jAlbum part, because in that case it works for all skins.
David may be you should consider it again!
I will. Can you refer me to your post on that?
|
|
|
Posts:
1,156
Registered:
14-Dec-2007
|
|
|
Re: Copy file to output folder, how to?
Posted:
28 Sep 22, 13:04
in response to: davidekholm
|
|
|
A little tricky in this case because he's using Tiger.
That’s why I did ask to implement my out folder concept in The jAlbum part, because in that case it works for all skins.
David may be you should consider it again!
I will. Can you refer me to your post on that?
Do you mean this thread?
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|