copy - Copying a file to a different folder and renaming it with the current date -


I am trying to recreate a VBScript which I wrote that will copy one file to a remote volume, Then rename the file with the current date. For this, Google (and SO) has a bunch of results, but I can not get hold of it right what I have, but when I run it, it returns a error "finder gets an error: Handler can not control the objects of this class. " on duplicate commands. Set date {date:}} with {date:}} set {day:}} to set (current date) with {year: y} (current date) date to mm & amp; "-" & amp; D & amp; "-" & amp; Y set filename to date & amp; "Finder" duplicate POSIX file "/ User / RHPT / Documents / Feel" for ".xml" POSIX file "/ Volume / Public / Backup" set name "POSIX file" ("/ version / public / backup / file") XML

for the file name as "nickname .xml" as the nickname. Try: mm set {month: mm, day: day, year} y} "& Y as text set file Set the name & amp; ".xml" application to date, say "finder", Duplicate file to POSIs file "/ Users / RHPT / Documents / Feel. To duplicate "XML" set POSIS file "/ Volume / Public / Backup" Duplex file name / Pre>

Edit

  at the end of the filename MM & amp; amp;; & amp;; & amp;; & amp;; & amp;; & amp; Y; as a text set file; on {date: mm, day: d, year} y} (current date); Set the name & amp; ".xml" source for the date Set the POSIX file "/Users/RHPT/Documents/File.xml" Dest Folder to the POSIX file "/ Volume / Public / Backup" Set application "Finder" to dupeFile let the name filename end destFolder set dupeFile to duplicate Source File  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -