Hi again
There is so many bright heads in this list, and the help im getting is wery good. As im struggelig towards my applescriptgoal i hope you all can help me with the next section of the script. I got help making a script for listing up all the files in a source folder to a text document, that tells me that my project is doable, but im not abel to get the rest done without your help.
So here is my project in discription.
"script" 1. Open dialog to select folder 2. Scan the selected folder for content (files/folder and subfolders + files) 3. make new folder ("selectedfoldername"-archive) 4. Put document with content of selectedfolder in "selectedfoldername"-archive folder 5. move selectedfolder to /Volume/mydisk/archived --------------------------------------------------------------------- This script by Ed Stockly works like a charm creating the file, but the rest of the script is difficult for me to work out.
set myFolder to choose folder set folderPath to POSIX path of myFolder tell application "Finder" set fileName to (the name of myFolder) & "-contents.txt" set myContents to entire contents of myFolder as alias list end tell set oldDelims to AppleScript's text item delimiters set AppleScript's text item delimiters to {folderPath} set newList to {} repeat with thisItem in myContents set thisPath to POSIX path of thisItem set the end of newList to text item 2 of thisPath end repeat set oldDelims to AppleScript's text item delimiters set AppleScript's text item delimiters to {return} set myList to newList as text set AppleScript's text item delimiters to oldDelims
set contentFile to (myFolder as text) & fileName tell application "Finder" set openFile to open for access file contentFile with write permission write myList to openFile close access openFile reveal item contentFile end tell
|