Create automatic folder and put files in that folder

Post Reply
mrkkrai
Newbie
Posts: 16
Joined: Thu Mar 17, 2016 4:31 pm

Create automatic folder and put files in that folder

Post by mrkkrai »

Hi:

I'm trying to create a flow which moves indesign package from one location to another, creating PDF and moves on same location.

But the problem is, I want to create a new folder named "Proof" automatically inside the final location and move the PDF in "Proof" folder.
loicaigon
Member
Posts: 147
Joined: Wed Jul 10, 2013 10:22 am

Re: Create automatic folder and put files in that folder

Post by loicaigon »

Hi,

You can use a specific close script:

http://dl.free.fr/etahMvQGm

Image

HTH

Loic
www.ozalto.com
mrkkrai
Newbie
Posts: 16
Joined: Thu Mar 17, 2016 4:31 pm

Re: Create automatic folder and put files in that folder

Post by mrkkrai »

Thanks for your response.

But the link you gave is unreachable. it says “The url has been blocked under instructions of the Competent Government Authority or in compliance to the orders of Hon’ble Court.”
loicaigon
Member
Posts: 147
Joined: Wed Jul 10, 2013 10:22 am

Re: Create automatic folder and put files in that folder

Post by loicaigon »

Here is the link as plain text:

Code: Select all

var pack = function() {
	
	var fo = Folder ( Folder.temp+"/"+$doc.name.replace (".indd", "" ) );
	!fo.exists && fo.create();
	
	var pf = Folder ( fo+"/Proof" );
	!pf.exists && pf.create();
	
	$doc.packageForPrint (fo, true, true, true, true, true, true, false);
	
	var pdfFile = new File ( pf+"/"+$doc.name.replace (".indd", "" )+".pdf" );
	var pst = app.pdfExportPresets.item("[PDF/X-1a:2001]");
	$doc.exportFile ( ExportFormat.PDF_TYPE, pdfFile, false, pst);
	
	$outfiles = [fo.fsName];
}

pack();
Save this as a jsx file then call it in the close command.

Loic
mrkkrai
Newbie
Posts: 16
Joined: Thu Mar 17, 2016 4:31 pm

Re: Create automatic folder and put files in that folder

Post by mrkkrai »

Here's screenshot of the flow. Can you please help me where should I call the jsx file?

http://s33.postimg.org/6f7k0sdtr/Screen ... _16_pm.png

Thanks
loicaigon
Member
Posts: 147
Joined: Wed Jul 10, 2013 10:22 am

Re: Create automatic folder and put files in that folder

Post by loicaigon »

Hi
From my understanding of the flow, you need InDesign to generate the PDF file from the package folder.

Image
mrkkrai
Newbie
Posts: 16
Joined: Thu Mar 17, 2016 4:31 pm

Re: Create automatic folder and put files in that folder

Post by mrkkrai »

Thanks a ton.

But is it somehow possible to create folders using "Set hierarchy path"?

Script renames the folder name with file name and deletes Links folder...
mrkkrai
Newbie
Posts: 16
Joined: Thu Mar 17, 2016 4:31 pm

Re: Create automatic folder and put files in that folder

Post by mrkkrai »

I guess I was unable to explain my problem problem. I'm trying again...

I'm getting multiple zip files in input folder:
Image
Zip files contain files like this:
Image
I'm unarchiving and adding unique numbers (highlighted) as prefix to each job folder and InDesign file by "Rename job" like this:
Image
Using "Set hierarchy path", job folders are arranged in "Production" folder date-wise (dd-mm-yy):
Image
I create PDFs of InDesign files. PDFs move in a "hot folder" where a rip software converts them to TIFF and send back to Switch.

Bottlenecks:
1. Need to create a subfolder "[job_name]_softproof" inside job folder.
2. Need to move that TIFF file inside this subfolder.
Image

Here's my flow:

Image

I'm not using any XML/Metadata.

Thank you.
Post Reply