Why two of the same folder?
I'm getting two of the same folders somehow and I don't know how to fix it.
Take a look:
http://img.skitch.com/20100923-jw9p6yh3enfpngei3rhxrbektp.pdf
What you are seeing is two of the same folder showing up in LR, but their files within each are different. How can I combine these folders so that they correctly show the architecture of my hard drive as one folder?
Additionally, how do I prevent this in the future?
Thank you,
J
Beat,
I'm doing something wrong and I don't know what it could possibly be as I seem to be following your instructions very closely. Here are your instructions with my questions in Red:
How to consolidate:
"Add Parent Folder" on all the folders to be consolidated, so you end up with as few top level folders as possible So, on both sets of "2010" I right click and hit Add Parent Folder so now they both have "Lightroom" as the parent folder
On all of the top level folders under a "non strategic" drive, choose "Update Folder Location ..."
Navigate to the folder on the network share through the path which you want to use in the future (one of the three described above) After I right click, I only have one option... to navigate in my Mac Finder to where the "Lightroom" (Parent) folder is
Now LR will (rightly so) tell you that the selected folder already exists in LR and asks you whether you want to combine the two folders
After I do all of the above things don't go exactly as planned. Do you know if your method only works for PC's? Does anyone know of a Mac solution that will work without disturbing the metdata and image changes?
Similar Messages
-
Why do manually added mp3s in the Podcasts app all show up in the same folder?
Let me explain!
I like to download lectures and talks and audio books from other sources than iTunes.
I like to add these mp3 files to iTunes, change the Media type of them from Music to Podcast, and transfer them to my iPod Touch. This is so I will more easily know which ones have been listened to and can be removed.
This worked (and works) well in the Music app. Everything was separated into folders based on what album name I had manually assigned to the ID3 tags of the files.
But in the Podcast app, all of these files are now lumped into one folder.
I currently have eight un-listened-to episodes of Philip K. Dick's Valis on my iPod Touch. But the folder shows a count of 106 unheard episodes in relation to this audio book, because it lumps all of my other manually added podcast media tracks into the same folder.
Why is this?
Why does the Podcasts app refuse to let me separate manually added files into individual folders based on album information?
Had the My Stations feature let me populate its playlists in a more rational manner, and also allowed me to manually change the running order of the tracks (something which only seems to be possible in the On-The-Go playlist), I would not think that this omission was such an annoyance.
I have been searching for months for mentions of this problem, but I have not seen a single one, and so I have finally decided to make my own thread.
Let me know if the nature of my problem remains unclear.
JoakimThat doesn't do anything.
When I plug my phone in and attempt to sync it with iTunes and click on "Steven's iPhone" under "Devices" the display to the right just says "loading..." and it stays like that for hours. Nothing happens.
As far as I can tell, there is literally no way for me to delete the photos from my iPhone and I therefore, cannot upgrade to the newest software, download new apps, etc. -
Why all the videos are in the same folder
Hi,
Is there a way to put videos in a different folder or they always ended up in the same folder on the Ipod, any help would be ....
thanks
MikeMy 10 step solution
1. Plug in your Ipod and start Itunes.
2. Now in Itunes select your Ipod.
3. Then go to file and click on New Smart Playlist.
4. make sure that Match the following rule is checked.
5. What I did was change artist to album and give it a name such as horror or action then press ok.
6. now when your movies are in the ipod go to your movie and click on file and click on get info.
7. A window opens and click on the info tab and under album write what you wrote for the smart playlist such as action or horror and click OK.
8. it will update your movie depending on file size and length is how long it will take to update.( for me with a dual 2.7 g5 i waited like 3-5 mins for a 2:30 hr movie.
9. Once done it will be in your new folder.
10. Your Done
I hope this helps. -
Multiple files with the same file name within the same folder
It looks like a finder bug. To replicate, I surf to any website, I right-click on a jpg image, select "Save Image As" and in the window that pops up I type in the filename "000.jpg", I select the folder Pictures, and click on Save.
BTW, I don't know why, but the file was saved only as "000" without the file extension ".jpg". Does anybody know why?
Then I surf to another image, and again I save it as "000.jpg" and now it asks me if I want to replace the existing filename, although the existing one is "000" and I try to save as "000.jpg", so I say yes, and then magically the file is saved with the full filename including the extension "000.jpg"
When I did it a couple of times, always saving image as "000.jpg" from various sources, I ended up with two distinct files named "000" and both in the same folder Pictures.
Please advise.Misio wrote:
It looks like a finder bug. To replicate, I surf to any website, I right-click on a jpg image, select "Save Image As" and in the window that pops up I type in the filename "000.jpg", I select the folder Pictures, and click on Save.
BTW, I don't know why, but the file was saved only as "000" without the file extension ".jpg". Does anybody know why?
the extension is simply hidden. go to the get info panel for the file and uncheck the option to hide the extension.
Then I surf to another image, and again I save it as "000.jpg" and now it asks me if I want to replace the existing filename, although the existing one is "000" and I try to save as "000.jpg", so I say yes, and then magically the file is saved with the full filename including the extension "000.jpg"
When I did it a couple of times, always saving image as "000.jpg" from various sources, I ended up with two distinct files named "000" and both in the same folder Pictures.
Please advise.
it sounds to me like you saved one file as 000.jpg and the other and 000.jpg.jpg.
check the info panels for the files for full names to verify if this is the case. -
Bridge CS4 always opens in the same folder
Since I upgraded to Photoshop CS4, Bridge always opens in the same
folder. It used to open up whatever folder I was working on last.
There must be a setting somewhere to tell Bridge to open the last
visited folder but I can't seem to find it. Any ideas?Thanks Curt. That helped. I do have Bridge set to automatically start with Windows. I thought that shutting down Windows would cause Bridge to remember the last visited folder since Bridge was closed but I need to right-click on the Bridge icon in the system tray and exit before shutting down Windows. At least now I know why this was happening!
-
Help?registerd two ipods on same folder
This is the dad who does not know nothing,both of my daughters got nanos and i think I registerd them to the same folder.I would like tem seperate.please tell me how.
thanks thedadWelcome to Apple Discussions!
There are two methods of managing multiple iPods on one computer.
Method 1 - Create different user accounts for each iPod on your computer.
Method 2 - Create different playlists in iTunes for each iPod.
To make method two work for you, first make the playlist. Then go to "Edit -> Preferences -> iPod". Make your setting to "automatically update selected songs". Select the playlist name that you want to make for that iPod, and do the same for both iPods on there.
For more details on how to manage this, see this Apple Support link below:
How to manage multiple iPods with one computer
I hope this helps!
-Kylene -
can not transfer date from one hard drive to another, I keep getting an error because I have two of the same file names and one file name is in caps and I cant change the file name. My original external has an error and needs to be reformatted but I dont want to lose this informations its my entire Itunes library.
Sounds like the source drive is formatted as case sensitive and the destination drive is not. The preferred format for OS X is case insensitive unless there is a compelling reason to go case sensitive.
Why can't you change the filename? Is it because the source drive is having problems? If so is this happening with only one or two or a few files? If so the best thing would be to copy those over individually and then rename them on the destination drive.
If it is more then you can do manually and you can't change the name on the source you will have to reformat the destination as case sensitive.
Btw this group is for discussion of the Support Communities itself, you;d do better posting to Lion group. I'll see if a host will move it. -
DLL needs to be in the same folder as LabView85.exe
I initialise a spectrometer using a call to
a dll through a call function library node. The dll was supplied with the
spectrometer (which also came with its own stand alone software) and was
installed in the spectrometer folders in C:\Program Files\Spectrometer. The standalone
software works fine. However my labview code does not initialise the
spectrometer properly if I point the function node to same copy of the dll.
In order to get my code to initialise
properly I have to
a)
put a copy of the dll in the
same folder as Labview85.exe
b)
reset the path in the call
library function node every time I open my code (ie browse and reselect the dll
that the node is already pointing to and click OK)
Any ideas why this is?
I am considering using the ‘Specify path on
diagram’ option to see if this would make a difference and allow me to point to
the dll in C:\Program Files\Spectrometer but since I have many function nodes
that I would need to change I would like to know if there is another fix, before
ploughing ahead.
I use calls to other dlls in the same
program and these work fine wherever the dll is located.
Thanks in advance
DaveHi Dave,
I apologize for misunderstanding the first go around. In order to prevent LabVIEW from prompting for the DLL path each time you execute, the location of the DLL must be added to the VI Search Path in LabVIEW. Here are the steps for accomplishing thispen a new VI in LabVIEW.
Select Tools » Options. Select Path and VI Search Path from the pulldown menus.
Uncheck the Use Defaults checkbox.
Use the Browse button to select the path to the directory in which you are storing the DLL.
You can find more details about the issue here.
Regards,
Justin Fuller
National Instruments
-Justin F
National Instruments
Worldwide Graphical System Design Conference and Exhibition
August 5-7 – Register now > -
Ok i have indesign CS6 and all files are stored on a 10.7.5 MAC server. This just started happening. When I open a file indesigns is creating a textfile in the same folder? I need some help on this.
Ask in the ID forum and be much more specific about your configuration. there could be any number of reasons why manifests, temp files or restore files are created.
Mylenium -
Does an external cnt file need to be in the same folder as the master cnt file?
I'm working in RoboHelp Word and have inserted two external
cnt files into a master cnt file. I've selected the option 'use
full path' as the external help file is installed under a different
folder than the master help file. However, I am unable to view the
extneral cnt file from the master cnt file, unless all cnt and hlp
files are installed in the same folder. Is it not possible to have
the external cnt files under a different folder? Thanks for any
assistance!Hi, SSchwa, and welcome,
I believe that you can keep the files in different folders
provided that they are in the help "search path". The following is
from Microsoft's WinHelp Author's Guide:
quote:
WinHelp now searches for Help files in the following
locations, in the order listed.
* If a path is specified, WinHelp first searches for the file
in the specified path. If the file is not found, the path is
removed and the following locations are searched.
* The folder of the current Help file.
* The current folder.
* The System subfolder of the Windows folder.
* The Windows folder.
* The folders listed in the PATH environment.
* The location specified in the Winhelp.ini file.
* The registry.
If WinHelp cannot find a Help file, it displays a dialog box
that enables the user to specify the location of the Help file. If
the users finds the file, WinHelp will add the location information
in the registry.
As far as registering the .hlp and .cnt files is
concerned, the registry key under which to do so is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help
Pete -
Making hypertext work if things are NOT in the same folder?
I am writing a large doc with FM (FM 8.0p277), several appendix files, 100+pages, etc. I am using hypertext to link external PNG images with the document. This is working just fine (message openfile:filename.ext). Then, I print as PDF doc, and still keeping the PNGs and the newly created PDF in same folder- the hypertext link still works fine.
My question is: this document will be released to clients, whom we can't necessarily make keep all elements in the same folder. Is there a way, when I generate the PDF of the final version, for the hypertext link to work if things are moved out of the same folder? I'm guessing not, but I thought if anyone would know, it would be in this forum...
Thx
AdrianaIf everything is in the same folder when the PDFs are created, then the links should all be relative. As long as the distributed files are all kept together when distributed, then things should continue work. However, if they move some files to different folders, then all bets are off.
Why are you making external links to the graphics files instead of importing them by reference into the FM file - especially PNGs? This doesn't make any sense to me.
If you need to keep everything separate initially (for whatever reason), then consider creating a PDF portfolio in Acrobat, that can't be split up, as the final deliverable. -
some music files do not show up in google play music app library. I did clear cache/data and restarted phone. The music is stored on the SD card. Most of the music in the library is in the same folder on the sd card. I can play the song from file manager, but it still is not in the music library in play music.
Cyndi6858, help is here! We'd be happy to help figure this out. Just to be sure though, the Droid Maxx should not have an SD card. Is this the Droid Razr Maxx? How did you add the music to the device? Are you able to see the files and folders located on the SD card or device when plugged in?
Thanks,
MichelleH_VZW
Follow us on Twitter @VZWSupport -
I backed up my ipad and iphone on the same computer, will it be shown on the same folder or different? Mine is window 7, try to find the back up file follow the step that apple provided, it shown only iphone instead of ipad. Pls help.
What do you see under Edit > Preferences > Devices?
tt2 -
Batch convert Pages files to Doc and stay in the same folder?
Hi there,
I use iWork '09 on Mountain Lion. I recently switched to Microsoft Word and prefer it over Pages (personal preference). However, I have nearly 1000 files on my computer that are in Pages format. I have extensively searched this issue in the Apple Support Communities and it appears that there are scripts that DO EXIST that batch convert Pages files into Word files. However, it appears that many of these scripts were built for older versions of iWork and therefore I run into various errors. For example, I used the script available at http://pagesfaq.blogspot.com/2008/01/export-folder-to-word-rtf-pdf-txt-or.html and click run but nothing actually happens (the script runs for less than a second, then I can click run again). I was able to use one script successfully (pasted below), but the only reason I can't use it is because it saves ALL my converted documents in one folder on my desktop and I would like a script that can save them in the original file were the Pages document is located.
So, is there an iWork '09 compatible script that can convert my Pages documents to Word documents and save them in the same folder as the original? Oh, and for an added bonus, it'd be cool if the script also deleted my Pages version after it was done with the conversion
--[SCRIPT batch_exportPages2DOC] (* Enregistrer ce script en tant que script ou progiciel. Exécuter ce script ou déposer l'icône d'un dossier sur son icône. Il ouvre tout document Pages du dossier et l' enregistre en fichier DOC dans le dossier "was_Pages_now_DOC". Celui-ci peut être sur le bureau ou dans le dossier "~/Documents". Si le GUIscripting n'est pas activé le script demande votre mot de passe pour l'activer. Le script récupère le dossier d'exportation par défaut dans le fichier de préférences de Pages. Éviter de cliquer durant l'exécution du script sauf évidemment pour sélectionner le dossier source. ************* Save the script as script or application bundle. Run it or drag and drop a folder icon on its icon. It opens every Pages's documents stored in the folder and save it as DOC file in a folder named "was_Pages_now_DOC". This one may be on the desktop or in the "~/Documents" folder. according to the property storeOnDesktop. If GUIscripting is disabled the script ask for your password to enable it. The script extract the default export path from the Pages's preferences file. Don't click when the script is running. Except, of course, to select the source folder. ************* Yvan KOENIG (VALLAURIS, France) 2008/04/20 2009/06/17 adapté pour format .doc 2009/12/13 updated for MacOs 10.6… *) property theApp : "Pages" property theExt : "pages" property nomDuRapport : "report_Pages2DOC.txt" property nom_du_dossier : "was_Pages_now_DOC" property storeOnDesktop : true (* true = dest folder will be on Desktop false = dest folder will be in "~/Documents" *) property msg1 : "" -- globale property msg90 : "" -- globale property msg91 : "" -- globale -- property msg92 : "" -- globale property msg94 : "" -- globale property msg96 : "" -- globale property msg99 : "" -- globale property rapport : "" -- globale property dossierDeStockage : "" -- globale property dossierParDefaut : "" -- globale property localExport : "" -- globale property newExt : "" -- globale property newType : "" -- globale property isOs4 : missing value -- globale property isOs5 : missing value -- globale property theMenu : missing value -- globale property menuExport : missing value -- globale property types : {{"doc", "SLDocumentTypeMSWord", 2}, {"pdf", "SLDocumentTypePDF", 1}, {"txt", "SLDocumentTypePlainText", 4}, {"rtf", "SLDocumentTypeRichText", 3}, {"rtfd", "SLDocumentTypeRichTextBundle"}, 3} --===== (* our settings *) property typeNum : 1 (* 1 = WORD, 2 = PDF, 3 = Txt, 4 = rtf, 5 = rtfd *) property theButton : missing value (* 1 button PDF 2 button Word 3 button RTF 4 button Standard *) --===== on run (* lignes exécutées si on double clique sur l'icône du script application • lines executed if one double click the application script's icon *) tell application "System Events" to set dossier to choose folder (* dans un bloc System Events pour avoir un titre de dialogue "localisé" • in a System Events block to get a localized dialog title. *) my commun({dossier}) -- my commun({"Macintosh HD:Users:yvan_koenig:Desktop:for_see:" as alias}) end run --===== on open (sel) (* sel contient une liste d'alias des éléments qu'on a déposés sur l'icône du script (la sélection) • sel contains a list of aliases of the items dropped on the script's icon (the selection) *) my commun(sel) end open --===== on commun(elems) my nettoie() my prepareMessages() tell application "System Events" if not (UI elements enabled) then set (UI elements enabled) to true (* Active le GUI scripting • Enable GUI scripting *) set titres to title of processes end tell -- to System Events if theApp is not in titres then my activateTheApp() (* Active et ferme la fenêtre du document créé à l'ouverture • Activate and close the doc's window created at opening *) set {newExt, newType, theButton} to item typeNum of types (* item 1 = {"doc", "SLDocumentTypeMSWord",2} item 2 = {"pdf", "SLDocumentTypePDF",1} item 3 = {"txt", "SLDocumentTypePlainText",4} item 4 = {"rtf", "SLDocumentTypeRichText",3} item 5 = {"rtfd", "SLDocumentTypeRichTextBundle",3} *) set sysAtt to (system attribute "sys2") if 4 > sysAtt then if my parleAnglais() then error "This script requires MacOs X 10.4 or higher !" else error "Ce script requiert MacOs X 1.4 ou ultérieur !" end if else if 5 > sysAtt then set isOs4 to true set isOs5 to false if my getVersion() < "4" then set theMenu to 3 set menuExport to 13 else set theMenu to 10 set menuExport to 9 end if else if 6 > sysAtt then set isOs4 to false set isOs5 to true if my getVersion() < "4" then set theMenu to 3 set menuExport to 13 else set theMenu to 10 set menuExport to 8 (* was a wrong 9 *) end if else set isOs4 to false set isOs5 to false if my getVersion() < "4" then set theMenu to 3 set menuExport to 13 else set theMenu to 10 set menuExport to 8 (* was a wrong 9 *) end if end if my fermeFenetres() (* • Close existing windows *) my afficheLeMessage(msg1) (* Éviter de cliquer… • Don't click… *) tell application theApp to set localExport to localized string "Export" set dossierParDefaut to my getDefaultExport() as text set rapport to "" set dossierDeStockage to my creeDossierDeStockage(nom_du_dossier) (* Unicode text *) try repeat with elem in elems try my exploreTraite(elem as alias, "") end try end repeat if rapport = "" then set rapport to msg90 -- crée un fichier texte sur le Bureau set p2d to path to desktop set p2r to (p2d as Unicode text) & nomDuRapport tell application "System Events" if exists (file p2r) then delete (file p2r) make new file at end of p2d with properties {name:nomDuRapport} end tell set rapport to rapport as text write rapport to (p2r as alias) on error MsgErr number NroErr if NroErr is not -128 then beep 2 tell application (path to frontmost application as string) to ¬ display dialog "" & NroErr & " : " & MsgErr with icon 0 buttons {msg99} giving up after 20 end if -- NroErr is… return end try my nettoie() if my parleAnglais() then my afficheLeMessage("Export done.") else my afficheLeMessage("Traitement terminé.") end if end commun --===== on nettoie() (* pour ne pas stocker dans le fichier script • So it will not be stored in the script file *) set dossierDeStockage to "" set dossierParDefaut to "" set rapport to "" set localExport to "" set newExt to "" set newType to "" set isOs4 to missing value set isOs5 to missing value set theMenu to missing value set menuExport to missing value set theButton to missing value set msg1 to "" set msg90 to "" set msg91 to "" set msg92 to "" -- set msg94 to "" set msg96 to "" set msg99 to " " end nettoie --===== on afficheLeMessage(m) beep 1 tell application (path to frontmost application as string) activate if my parleAnglais() then display dialog m buttons {" OK "} default button 1 giving up after 10 else display dialog m buttons {" Vu "} default button 1 giving up after 10 end if end tell end afficheLeMessage --===== on creeDossierDeStockage(Nom) (* S'il n'existe pas, construit un dossier destination sur le bureau ou dans "~/Documents" • If does not exist, create a destination folder on the desktop or in "~/Documents" *) local dd, dds if storeOnDesktop is true then set dd to path to desktop as Unicode text else set dd to path to documents folder as Unicode text end if if Nom ends with ":" then set dds to dd & Nom else set dds to dd & Nom & ":" end if (* dossierDeStockage n'existe pas, on le crée • dossierDeStockage is not available, build it *) tell application "System Events" to if not (exists item dds) then make new folder at end of folder dd with properties {name:Nom} return dds as Unicode text end creeDossierDeStockage --===== on exploreTraite(elem, ptree) (* elem est un alias • elem is an alias *) local elem_, cl_, type_Id set elem_ to elem as Unicode text tell application "System Events" to tell disk item elem_ set cl_ to class if cl_ is folder then set type_Id to "" else set type_Id to type identifier end if end tell -- "System Events" set cl_ to cl_ as Unicode text if type_Id is in {"com.apple.iwork.pages.pages", "com.apple.iwork.pages.sffpages"} then (* C'est un fichier Pages. • It's a Pages document *) my TraiteUnDocument(elem_) else if cl_ is in {"file package", "«class cpkg»"} then set rapport to rapport & msg91 & elem_ & return (* "Package", Attention, un package EST un dossier "spécial". • Caution, a package IS a "special" folder. *) else if cl_ is in {"folder", "«class cfol»"} then my ExploreUnDossier(elem_, ptree) else set rapport to rapport & msg92 & elem_ & return (* "Pas un document Pages". • "Not a Pages's document" *) end if -- typeId_ is … end exploreTraite --===== on ExploreUnDossier(dossier, ptree) local nomElement, cheminElement, c repeat with nomElement in list folder dossier without invisibles set cheminElement to dossier & nomElement tell application "System Events" to set c to name of (dossier as alias) my exploreTraite(cheminElement as alias, ptree & c & ":") end repeat end ExploreUnDossier --===== on TraiteUnDocument(leCheminOriginal_UniText) my export2Doc(leCheminOriginal_UniText as alias, leCheminOriginal_UniText) end TraiteUnDocument --===== on export2Doc(p, leCheminOriginal_UniText) (* • here p is the path as alias *) local flag, nom_de_p, nouveauChemin, w, bof, x, p_xport try tell application theApp open p set flag to false repeat 300 times (* Attends que le fichier soit réellement ouvert. • Wait until the file is really open *) if my getNbWindows() > 0 then set flag to true exit repeat end if end repeat end tell -- to theApp if flag is false then error number 8888 (* Le fichier n'a pu être ouvert. • The file can't be open. *) on error MsgErr number NroErr if NroErr = 8888 then set rapport to rapport & msg94 & leCheminOriginal_UniText & return else set rapport to rapport & "### " & MsgErr & " ### " & errNbr & return end if return (* can't do the remaining tasks *) end try tell application "System Events" to tell file leCheminOriginal_UniText set nom_de_p to name end tell -- System Events if nom_de_p ends with theExt then set nom_de_p to text 1 thru -(2 + (length of theExt)) of nom_de_p set nouveauChemin to dossierParDefaut & nom_de_p & "." & newExt --log nouveauChemin tell application "System Events" to if exists (file nouveauChemin) then set name of file nouveauChemin to nom_de_p & my horoDateur(modification date of file nouveauChemin) & "." & newExt (* name stamped *) try set {w, bof} to my getFrontWindow() tell application "System Events" to tell application process theApp click menu item menuExport of menu 1 of menu bar item theMenu of menu bar 1 (* Exporter… *) repeat until exists sheet 1 of window w delay 0.1 end repeat tell sheet 1 of window w (* sheet containing the buttons PDF, Word, RTF, Standard *) -- get properties of UI elements of radio group 1 if isOs4 then click button theButton of radio group 1 else if isOs5 then click checkbox theButton of radio group 1 else click radio button theButton of radio group 1 (* I hope that they will no longer change it *) end if -- isOs4 is true (* if typeNum is 2 then delay 0.2 tell pop up button 1 click click menu item quality of menu 1 end tell delay 0.2 end if *) click button 1 (* Suivant… *) repeat until exists button localExport delay 0.1 end repeat click button localExport (* Exporter… *) end tell -- to sheet… repeat 20 times if exists sheet 1 of window w then click button 2 of sheet 1 of window w (* "Ne pas consulter " dans éventuel rapport d'anomalies • "Don't review" in sheet reporting possible export anomalies *) exit repeat end if delay 0.1 end repeat end tell -- to process … System Events if dossierDeStockage is not dossierParDefaut then (* we must move the file from folder dossierParDefaut to folder dossierDeStockage *) set p_xport to dossierDeStockage & nom_de_p & "." & newExt tell application "System Events" to if exists (file p_xport) then set name of file p_xport to nom_de_p & my horoDateur(modification date of file p_xport) & "." & newExt tell application "Finder" to duplicate file nouveauChemin to folder dossierDeStockage (* • before 10.5, System Events is unable to move *) my wait4File(p_xport) tell application "System Events" to if exists file nouveauChemin then delete file nouveauChemin end if -- dossierDeStockage is not… my ferme1fenetre() on error errMsg number errNbr set rapport to rapport & msg96 & p & return & errMsg & " ### " & errNbr & return end try end export2Doc (* ===== • Build a stamp from the modification date_time *) on horoDateur(dt) local annee, mois, jour, lHeure, lesSecondes, lesMinutes set annee to year of dt set mois to month of dt as number (* existe depuis 10.4 *) set jour to day of dt set lHeure to time of dt set lesSecondes to (lHeure mod 60) set lHeure to round (lHeure div 60) set lesMinutes to (lHeure mod 60) set lHeure to round (lHeure div 60) return "_" & annee & text -2 thru -1 of ("00" & mois) & text -2 thru -1 of ("00" & jour) & "-" & text -2 thru -1 of ("00" & lHeure) & text -2 thru -1 of ("00" & lesMinutes) & text -2 thru -1 of ("00" & lesSecondes) (* • Here, the stamp is "_YYYYMMDD-hhmmss" *) end horoDateur (* ===== • Take care, the front window may be an Inspector or a dialog one. *) on getFrontWindow() local namesOfWindows, w, flag tell application theApp to activate set flag to false tell application "System Events" to tell application process theApp set namesOfWindows to name of every window repeat with w in namesOfWindows if subrole of (get properties of window w) is "AXStandardWindow" then set flag to true exit repeat end if end repeat end tell return {w, flag} (* • w is the name of the front document's window *) end getFrontWindow (* ===== • Wait that the file is completely written on disk *) on wait4File(p) (* • p must be Unicode text *) local oldSize, nnn, newSize set oldSize to 0 tell application "System Events" to set nnn to name of file p repeat try tell application "System Events" to set newSize to physical size of file p if oldSize < newSize then set oldSize to newSize else exit repeat end if end try end repeat end wait4File --===== on activateTheApp() local bof, status tell application theApp to activate if my getStartingStatus() is false then tell application "System Events" to tell application process theApp to keystroke return repeat set {bof, status} to my getFrontWindow() if status is true then exit repeat end repeat end activateTheApp (* ===== • Close existing open windows *) on fermeFenetres() repeat while my getNbWindows() > 0 my ferme1fenetre() end repeat (* • Now there is no open window *) end fermeFenetres --===== on ferme1fenetre() tell application theApp to activate tell application "System Events" to tell application process theApp to keystroke "w" using {command down} end ferme1fenetre --===== on getPlistValue(valName, default) local thePlist, u set thePlist to (path to preferences folder as Unicode text) & "com.apple.iWork." & theApp & ".plist" tell application "System Events" if exists file thePlist then tell contents of property list file thePlist try set u to (value of property list item valName) (* Unicode Text *) on error (* On est là si Pages n'a rien enregistré avec des préférences neuves • Here if Pages never saved with the new preferences file. *) set u to default end try end tell -- to contents of… else (* On est là s'il n'y a pas de fichier de préférences • Here if there is no preferences file. *) set u to default end if end tell -- to system events return u end getPlistValue --===== on getStartingStatus() return my getPlistValue("LSDefaultsUseDefaultStartingPoint", false) end getStartingStatus --===== on getDefaultExport() local u (* son of a *****, I forgot that they don't use the same name !! *) if theApp contains "Pages" then set u to my getPlistValue("SLDocumentDefaultExportDirectory", "~/Documents") else if theApp contains "Numbers" then set u to my getPlistValue("LSDocumentDefaultExportDirectory", "~/Documents") else error "I didn't coded a Keynote version !" end if set u to (POSIX file (do shell script "echo " & u)) as text if u ends with ":" then return u else return (u & ":") end if end getDefaultExport --===== on getNbWindows() tell application "System Events" to tell application process theApp to return count of windows end getNbWindows --===== on getLocale(a, x) tell application a to return localized string x end getLocale --===== on getVersion() try tell application theApp to return version on error return "1" end try end getVersion --===== on parleAnglais() local z try tell application theApp to set z to localized string "Cancel" on error set z to "Cancel" end try return (z is not "Annuler") end parleAnglais --===== on prepareMessages() if my parleAnglais() then set msg1 to "Don’t click when the script is running." & return & "Except, of course, if it ask for." set msg90 to "No problem during the export process." set msg91 to "Package" set msg92 to "Not a " & theApp & "’s document" -- set msg94 to theApp & " can’t read it" set msg96 to "Not copied." set msg99 to "Oops" else set msg1 to "Éviter de cliquer durant l’exécution du script" & return & "sauf s’il le demande." set msg90 to "Exportation réussie sans incident." set msg91 to "Package" set msg92 to "Pas un document " & theApp -- set msg94 to theApp & " n’a pas pu le lire" set msg96 to "Pas copié." set msg99 to " Vu " end if set msg91 to "### " & msg91 & " ### " set msg92 to "### " & msg92 & " ### " -- set msg94 to "### " & msg94 & " ### " set msg96 to "### " & msg96 & " ### " end prepareMessages --===== --[/SCRIPT]Try this app: http://tyorex.com/iWorkConverter
Batch convert Pages files to doc and pdf. -
Find text and replace with a pdf stored in the same folder
Hello,
I have a catalog that is updated every so often. I have written a script to find/replace the text from a .txt file. but i have a pdf that i want to insert that is part of it as well. Inside the .txt file i have the name of the document. and the pdf is stored inside the same folder as the original .indd and the .txt file.
can someone point me at some examples on how this could be done.
ThanksI use this script: it puts a txt in a text frame, check the overflow and find/replace some words with a pdf. Hope this is helpful.
Paolo
/************************FLOW************************************************
* This function looks for Overflows in the story and either resizes the *
* frame to the size of the margins (if necesary) or adds a new page and *
* a new frame, which is then linked to the previous frame.esizes the *
function flow(){
for(var i = 0; i < app.activeDocument.pages.count(); i++)
for(var b = 0; b < app.activeDocument.pages[i].textFrames.count(); b++)
if(app.activeDocument.pages[i].textFrames[b].overflows == true )
var currentPage = myDocument.pages[i];
var myPageNo = currentPage.name;
var currentFrame=currentPage.textFrames[b];
var e =currentFrame.geometricBounds[0];
var f =currentFrame.geometricBounds[1];
var g =currentFrame.geometricBounds[2];
var h =currentFrame.geometricBounds[3];
if(myPageNo %2==0){
var myMargins =currentPage.marginPreferences;
var a = currentPage.bounds[0]+myMargins.top;
var b = currentPage.bounds[1]+myMargins.right;
var c = currentPage.bounds[2]-myMargins.bottom;
var d = currentPage.bounds[3]-myMargins.left;
else{
var myMargins =currentPage.marginPreferences;
var a = currentPage.bounds[0]+myMargins.top;
var b = currentPage.bounds[1]+myMargins.left;
var c = currentPage.bounds[2]-myMargins.bottom;
var d = currentPage.bounds[3]-myMargins.right;
if (g < c)
currentFrame.geometricBounds = [a,b,c,d];
else if (g==c){
var newPage = myDocument.pages.add(LocationOptions.AFTER, currentPage);
currentPage = newPage;
myPageNo = currentPage.name;
if(myPageNo %2==0){
var myMargins =currentPage.marginPreferences;
var a = currentPage.bounds[0]+myMargins.top;
var b = currentPage.bounds[1]+myMargins.right;
var c = currentPage.bounds[2]-myMargins.bottom;
var d = currentPage.bounds[3]-myMargins.left;
var newFrame = currentPage.textFrames.add({geometricBounds:[a,b,c,d]});
newFrame.textFramePreferences.textColumnCount = 7;
newFrame.previousTextFrame = currentFrame;
else{
var myMargins =currentPage.marginPreferences;
var a = currentPage.bounds[0]+myMargins.top;
var b = currentPage.bounds[1]+myMargins.left;
var c = currentPage.bounds[2]-myMargins.bottom;
var d = currentPage.bounds[3]-myMargins.right;
var newFrame = currentPage.textFrames.add({geometricBounds:[a,b,c,d]});
newFrame.textFramePreferences.textColumnCount = 7;
newFrame.previousTextFrame = currentFrame;
//************************************END FLOW FUNCTION*********************************************
/*******************TextPlacer***************************
this script will add a text file in an existing text frame
Questo file deve essere copiato nella cartella Script di InDesign
function myGetBounds(myDocument, myPage){
var myPageWidth = myDocument.documentPreferences.pageWidth;
var myPageHeight = myDocument.documentPreferences.pageHeight
if(myPage.side == PageSideOptions.leftHand){
var myX2 = myPage.marginPreferences.left;
var myX1 = myPage.marginPreferences.right;
else{
var myX1 = myPage.marginPreferences.left;
var myX2 = myPage.marginPreferences.right;
var myY1 = myPage.marginPreferences.top;
var myX2 = myPageWidth - myX2;
var myY2 = myPageHeight - myPage.marginPreferences.bottom;
return [myY1, myX1, myY2, myX2];
/*******************ImagePlacer***************************
this script will addimages to the document by
substituting them with the name of the image file
between @s (file format included[@mypic.bmp@]),
selecting them from a specified file (see below)
and applying object styles to them, as well as
applying the right tab i necesary.
It then looks for overflows in the document. If an
overset is found, it will resize to margin size the
text frame and if overset continues, it will add a
new page and frame, which then will be linked
to the previous frame, allowing the story flow.
Questo file deve essere copiato nella cartella Script di InDesign
//Creates a new document using the specified document preset.
//Replace "myDocumentPreset" in the following line with the name
//of the document preset you want to use.
var myDocument = app.documents.add(true,app.documentPresets.item("Preset"));
//If the active document has not been saved (ever), save it.
if(app.activeDocument.saved == false){
//If you do not provide a file name, InDesign displays the Save dialog box.
app.activeDocument.save(new File("/Users/Paolo/Desktop/Documento.indd"));
function main()
var myDocument = app.documents.item(0);
var myPage = myDocument.pages.item(0);
var myTextFrame = myPage.textFrames.add({geometricBounds:myGetBounds(myDocument,myPage)});
myTextFrame.textFramePreferences.textColumnCount = 7;
myTextFrame.place(File("/Users/Paolo/Desktop/text.txt"));
//Place a text file in the text frame.
//Parameters for TextFrame.place():
//File as File object,
//[ShowingOptions as Boolean = False]
//You'll have to fill in your own file path.
//Define GREP search
var grepFind ="@@@.+@@@";
//Folders name where there are pdf, must be in the same place of the file
var myFiguresFolder = "testatine";
// Applied paragraph style
var myPStyle = myDocument.paragraphStyles.item("Paragraphstyle");
var NextPStyleCS = myDocument.paragraphStyles.item("Par_Style");
var NextPStyleEN = myDocument.paragraphStyles.item("Par_Style_en");
var NextPStyleDE = myDocument.paragraphStyles.item("Par_Style_de");
// Applied text style
var myCStyle = myDocument.characterStyles.item("text");
//Applied object style
var myOStyle = "";
var oStyle_1 = myDocument.objectStyles.item("Pictures");
var oStyle_2 = myDocument.objectStyles.item("Pictures");
var oStyle_3 = myDocument.objectStyles.item("Pictures");
//MEASUREMENTS
var maxWidth = 467; //Maximum width of an image
var maxHeight = 666; //Maximum Height of an image
var colWidth = 468; //Width of the main columb (340pt) + maximum Tab (128pt)
var maxTab = 0;
var xTab;
var xtTab;
var minTWidth = 340; //any image with a width below this will have the maximum Tab (maxTab) applied.
var PWidth; //Width of the Picture
var PHeight;//Picture Height
var myTotal;
//---------------------------------ALERTS---------------------------------\\
var notSaved = "Documento non salvato; devi prima salvare il documento";
var noFolder = "No such folder exists; "+myFiguresFolder;
var noImageMessage = "No Images were found";
var finished = " immagini sostituite"
//---------------------------------ALERTS---------------------------------\\
/************************END OF STORY*****************************************
* The object of this bit of programming is to add an empty paragraph break *
* at the end of the story, in order to make the actual script work in the case *
* that the LAST paragraph were a TABLE *
var findEnd_of_Story = "\\r(?=\\z)" //GREP for End of Story //
app.findGrepPreferences = NothingEnum.nothing; //
app.changeGrepPreferences = NothingEnum.nothing; //
app.findGrepPreferences.appliedParagraphStyle = myPStyle; //
app.findGrepPreferences.findWhat = findEnd_of_Story; //
var fItems = myDocument.findGrep(); //
var myC = fItems.length-1; //
if (fItems =!0){ //
do{ //
if (fItems.appliedParagraphStyle = myPStyle){ //
cItem = fItems[myC] //
app.changeGrepPreferences.changeTo = "$0\\r"; //
myDocument.changeGrep(); //
myC--; //
while (myC >= 0); //
try{
var myDocPath = myDocument.filePath; //Complete Path to the Current Document
catch (myError){
alert (notSaved);
//throw("");
return;
var myFFldr =Folder(myDocPath+"/"+myFiguresFolder); //Complete Path in which the figures to be placed should be found
if(myFFldr.exists){
flow();
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = grepFind;
var myFoundItems = app.activeDocument.findGrep();
var myCounter = myFoundItems.length-1
myTotal = myCounter+1;
for (i = myCounter; i >=0; i--) {
var myName = myFoundItems[i].contents.replace (/@/g, "");
app.selection = myFoundItems[i];
var fFig=app.selection[0];//Found text for
var cPStyle= fFig.appliedParagraphStyle;
var myFile = new File( myFFldr + "/" + myName);
if (myFile.exists) {
var cFig = fFig.place(myFile);
var sFig = cFig[0].parent;
switch (cPStyle){
case (myPStyle):
myOStyle =oStyle_1;
PWidth = sFig.geometricBounds[3] - sFig.geometricBounds[1];
PHeight = sFig.geometricBounds[2] - sFig.geometricBounds[0];
if (PWidth >= minTWidth){
xTab = (colWidth-PWidth);
else{
xTab =maxTab;
var currentPar = sFig.parent.paragraphs.item(0);
currentPar.leftIndent = xTab;
var nextPar= currentPar.insertionPoints[-1].paragraphs[0];
var nextParStyle = nextPar.appliedParagraphStyle;
if (nextParStyle == NextPStyleCS||nextParStyle ==NextPStyleEN||nextParStyle == NextPStyleDE){
xtTab = xTab
else {
xtTab = nextPar.leftIndent;
nextPar.leftIndent =xtTab;
sFig.appliedObjectStyle = myOStyle;
cPStyle = "";
break;
case (myPStyle):
myOStyle = oStyle_3;
sFig.appliedObjectStyle = myOStyle;
cPStyle = "";
break;
default:
myOStyle = oStyle_2;
sFig.appliedObjectStyle = myOStyle;
cPStyle = "";
break;
var oFig = sFig;
sFig = ""
flow();
//alert(myTotal + finished);
else{
alert(noFolder);
var myDocument = app.documents.item(0);
//Clear the find/change grep preferences.
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
//Set the find options.
app.findChangeGrepOptions.includeFootnotes = false;
app.findChangeGrepOptions.includeHiddenLayers = false;
app.findChangeGrepOptions.includeLockedLayersForFind = false;
app.findChangeGrepOptions.includeLockedStoriesForFind = false;
app.findChangeGrepOptions.includeMasterPages = false;
//Regular expression to use
app.findGrepPreferences.findWhat = "<(.+?)>";
//Apply the change to 24-point text only.
//app.findGrepPreferences.pointSize = 24;
//app.changeGrepPreferences.underline = true;
var myFoundItems = app.activeDocument.findGrep();
var myCounter = myFoundItems.length-1
myTotal = myCounter+1;
//alert("occorrenze" + myTotal);
app.changeGrepPreferences.changeTo= "$1";
app.changeGrepPreferences.appliedCharacterStyle= myDocument.characterStyles.item("head");
myDocument.changeGrep();
for (i = myCounter; i >=0; i--) {
var myName = myFoundItems[i].contents.replace ("/</g", "");
var myName = myFoundItems[i].contents.replace ("/>/g", "");
app.selection = myFoundItems[i];
var fFig=app.selection[0];//Found text for
var myCStyle = myDocument.characterStyles.item("head");
app.selection[0].applyCharacterStyle(myCStyle, true);
//Clear the find/change preferences after the search.
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
main();
Maybe you are looking for
-
Elements 6.0 won't run from my external hard drive?
So I had Photoshop Elements 6.0 installed on my laptop. Long story short, my laptop died. I removed the hard drive, put it in a case and turned it into an external. When placed into another working laptop, Elements runs just fine. However, when I hoo
-
How can i create work directory for Tomcat4 which is installed on Mandrake
Hello Everybody, I installed Tomcat4 with the help of JPackage on Madrake Linux. It is working fine. But Unfortunatly my work folder in tomcat4 is deleted. I restarted my Tomcat, But the work folder not created. my application is not working. I need
-
How do I insert a cell or range of cells in Numbers?
From what I've read, one has to highlight and move cells to create the space for the new cells. This may be fine for small tables, but I have an inventory that currently has over 2000 lines of data. So if I need to add a line of data at row 2, then
-
Save the pdf file in after report trigger
Hi friends, How can I save the report PDF result file in table from after report triger? I am using Oracle report 10g. So is it possible to do that. thanks
-
Calling Stored Procedure from ODBC
I call a stored procedure that contains a reference to a database link through ODBC. I get the following errors (LOAD_PDI is the name of the procedure): ORA-02041: Client database did not begin a transaction ORA-06512: at "LOAD_PDI" line 16 ORA-06512