Rename a chosen file
hey, I´ve some probs with renaming files...here´s
how it goes:
I browse for a file and want to rename it.
the new name is already generated.
and now I just want to replace the old name of the file with
my new generated one and "save" this to the filesystem - means
overwrite the old filename.
in the documentation I´ve found this code:
var original = air.File.documentsDirectory.resolvePath("AIR
Test/test.txt");
var newFile = air.File.documentsDirectory.resolvePath("AIR
Test/copy.txt");
original.copyTo(newFile, true);
but I don´t know how to point on the directory of the
file...because I browse to it. in the docs the directory is already
set...
I´ve tried to replace
"air.File.documentsDirectory.resolvePath("AIR Test/test.txt"); "
with the source (means url) of my file and
"air.File.documentsDirectory.resolvePath("AIR Test/copy.txt"); "
with the url I´ve put together out of the parent path of the
chosen directory, my new filename and its extension. but I got this
error message: "TypeError: Value undefined (result of expression
original.copyTo) is not object."
maybe it sounds confusing but I hope some of you guys can
help me out.
thanks so far.
ok...I´ve found my mistakes and now it works...was just
pointing to the wrong path/url...
Similar Messages
-
In Adobe Reader X...when I rename a pdf file that is on my desktop, and upload it to a report it appears on the report with the previous name. I want it to appear as I have renamed it. Please help!
Yes thank you......It is a real estate 4 page document that I need and have uploaded into my real estate listing, and that I have scanned from the file option to save on my desktop in pdf file. I then rename it by removing the last 5 zeros and pdf from the name I have previously chosen in the printer Control Center 3. When I rename the file on my desk top it looks OK, Then I go into the MLS real estate website and upload it after I locate it on my desktop. It uploads fine and shows the filename at the left of the doc which is OK except the 5 zeros and pdf are there again. I named the file ...12 Gardenville-pcd pdf. and want it to appear that way after uploading, but it apears as 12 Gardenville-pcd pdf 00000 pdf. the way it came from the printer to desktop and before I renamed it.
Sorry I couldn't reply sooner Also yesterday a gentleman from Adobe Paid tech support (though I didn't have to pay) was able to take care of this problem, and I was able to successfully upload a renamed doc, but when after I tried to accomplish it on my own I was not able to succeed in doing so.
Thanks,
Joebif. -
Download Helper Screen Capture worked to capture video if the default "no audio" option is active. But, no audio. The "speakers" or "microphone" audio options are confusing....the audio to be captured is from the video, so what do you choose? With either "speakers" or "microphone" selected, the captured file has poor audio and no video. Re-capture efforts (speakers) get "Invalid capture file error" and "File Creation error- Unable to rename/copy audio file"
The paid upgrade of "Converter" doesn't work.
Instructive documentation - not very good.
Suggestions - Need time delay between initiation of "Record" and starting the video to be recorded.
Could use timer tracking of the record process.
Are there operating system limitations? (Have Windows XP Pro)That is an issue for the developer of that Download Helper.
-
How to rename back to files instead of folder artist / song
Hello,
I have folder full of mp3 that I want to simply be organized by file. In playing around with iTunes, I pointed it to that folder and it did a mass reorganization of all of my mp3s into the classic artist / album / song when all I want is the way it was with a list of all files and not in folders. I plan to copy these into the iTunes music folder so they can be organized that way.
How do I "undo" what iTunes did and get it back to the way it was? This did not happen by iTunes copying the files since I pointed iTunes directly to that folder, it renamed my actual files. This is an error on my part, but there has to be a way to undo this (nope, don't have a backup copy or anything since I didn't think iTunes would actually modify my files).
Thanks!I found MusicBrainz tagger and will give that a shot, but I'm sure it won't get many songs.
MusicBrainz is the only really good way to take a bunch of unorganized files and tag them properly. However, I've found that it's actually quite good. It gets about 60-70% without any intervention, and the rest it will make a best guess and and let you confirm whether it's guess was correct. It isn't exactly the simplest program in the world to use though, but works quite easily once you get the hang of it.
Sign up for a musicbrainz account before using the tagger. You really need an account to use the manual features of the program. -
How to rename the XML file generated during payment run
Hi,
We have a requirement to rename the XML file during payment run, format some fields of XML file and upload it onto Application server with the new XML file name. All these activities need to be performed during payment run F110.
Please let know if there is any User exit or Enahancement to achieve these functionalities.
Thanks !
Regards,
RavinderHi,
We have achieved the second functionality also i.e. populating the additional nodes or custom nodes of an extended tree.
This is what we have done...
We have copied the standard exit FM: DMEE_EXIT_TEMPLATE_EXTEND_ABA into a custom one and assigned it to each (custom) node in 'Source' tab. Line item text FPAYP-SGTXT will not be returned via this FM, so we fetched it explicitly from BSEG table using the input FPAYP-DOC2R (this field will have the company code, document number, fiscal year and item no, all concatenated).
Thanks,
/Ravinder -
Not renaming attachment xml file name in receiver mail adapter
Hi,
I receive SOAP from GRC and need send to Partner an email.
I have SOAP to MAIL scenario where an xml file is picked up and transformed and zipped into the target format in XI which has to be sent as an attachement in an email on the receiver side.
I am getting the mail with the attachement. But I would like to rename the attachment as the name "NFE.XML" and the ZIP File as the name "nfe.zip"
I am using MAIL adapter with Modules above.
Number Module Name Module Type Module Key
1 AF_Modules/PayloadSwapBean Local Enterprise Bean Transform
2 AF_Modules/MessageTransformBean Local Enterprise Bean ContentType
3 AF_Modules/PayloadZipBean Local Enterprise Bean zip
4 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
Module Configuration :
Module Key Parameter Name Parameter Value
Transform swap.keyName payload-name
Transform swap.keyValue NFE
ContentType Transform.ContentType application/xml; name="NFe.xml"
zip zip.filenameKey ContentType
zip zip.mode zip
I am using transport protocol "XIPAYLOAD" and set "KEEP ATTACHMENTS"
I have with result example above :
Name from ZIP : PayloadName.zipu200E(4KB)u200E
Name from attachment : PayloadName
Regards,
RicardoHi Shobhit,
The module tab of your mail adapter will look like this.
Processing Sequence
Module Name Type Module Key
localejbs/AF_Modules/MessageTransformBean rename LocalEnterpriseBean
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail Local EnterpriseBean
Module Configuration
Module Key Parameter Name Parameter Value
rename Transform.ContentDescription File
rename Transform.ContentDescription attachement;filename="yourfilename.ext"
rename Transform.ContentType application/text;name="yourfilename.ext"
Thanks
Amitanshu -
Good evening. When I try to rename a master file or export a master file, Aperature 3 only recognizes the first 9 spaces for raw .NEF files, even though it easily uses twice that many spaces for version names. I have a system in place that works really well for me, wherein by changing the file name I can recognize what's important to me just by glancing at the file name, no matter what system it is in, I do not have to open or mouse over anything to know what the file is. My files also arrange themselves in order no matter what file system they are in. Can someone please tell me if there is a setting, or something I am doing wrong, that prevents me from using a longer Master file name. I can't be the only person who would like to have his Master File names correspond to the name that appears in the Aperature library, and would like to use at least 16 spaces (numbers, letters, etc.)
Thanks,
Photo AlHi Frank,
As you suggested, I am attaching several screen shots. In the first one you can see how I set up my preset. I used "Custom Name" and "Counter" with a dot between the two drag ins, followed by "D90". I also have a dot to seperate the 8 digits in the Custom Name and make it easier to read.
I then click "OK" which takes us to the second screen shot. Here you can see that in the Example File Name everything looks perfect, and you can see I have clicked on "Apply to Master Files".
In the third screen shot you can see that the version in my library did in fact change correctly. With the "mouse over" pop up screen you can see, however, that the Master File name was changed to "1933.1017.NEF". It failed to carry the "12D90" and if I go to where my masters are stored that is exactly what the name was changed to.
In the fourth screen shot I attempt to export the master. You can see how my "Version Name" is set up.
And finally on the 5th screen shot you see in the File Name Example the name "1933.1017.NEF" once again, which when I export the master is exactly how the name will appear. Since I will export more than one file at a time , a (1) and a (2) etc., will appear at the end of the names because all the files are being given the same "1933.1017.NEF" name.
I hope this reply does a better job of clarifying my problem. I am anxious to see if this is something I simply misunderstood, or if I am simply doing something wrong.
Thanks,
Photo Al -
Renaming Outbound Payment File R12
We are upgrading from 11i to R12 and will now be creating cheques in EBS. I have a requirement to rename the output files (cheques, advices and efts) using the naming conventions provided by our printer and financial institution.
The Outbound Payment File Prefix/Extention/Directory fields provided on the Payment Process Profile are not sufficient, as we need dynamic names (i.e. date stamps. sequence number, control totals, name of payment template). Ideally the users want this renaming process to run automatically after each payment batch with no user intervention.
Has anyone done anything like this? Any suggestions as to where I might start?
Thanks.
Tam.Thanks, Hussein.
So based on the Oracle Note, I am definitely looking at a custom solution. If you or anyone else has a faced a similar requirement, I would be interested in hearing what type of workaround you were able to come up with.
Thanks,
Tam. -
Can you rename backed up files on time capsule?
Can you rename backed up file on time capsule?
You can rename the sparsebundle file that Time Machine has used for the backups of a Mac on a Time Capsule.....if that is what you are asking......just like you can rename any file on a Mac.
-
TextEdit won't let me rename duplicated .html files as a .html file (manually typing it) either in the Finder or the Title Bar by selecting Rename or Save.
I am only able to rename a duplicated .html file right after I create it, because the file name gets highlighted in the Title Bar, but after that there is no recourse. I I can Rename or Save the file if I want to just save it as a .txt, but I need it to be .html. I guess I can manually change the file later, but it's really annoying.I remember long ago a similar issue with TextEdit, but I can't remember if there was a solution or not.
Do you have it set to Display HTML files as HTML code and also deselect "When Saving a File: Add ".txt" extension to plain text files" -
When I try to rename a temp file with renameto() method,
it is not renaming. Either it didn't throw any error exceptions. The original file (not the temp file) has the write permission also.
Anybody knows what may be the problem ?
Any sample codes ?One thing to take a look at: I have seen renaming problems when attempting to use a File object for opening/writing/closing, and then renaming.
If you are executing this sequence, try creating a second File object with the same temp path, and using that to do the renaming. -
I need to rename a text file in a java application.Can somebody give me a sample code or some ideas on how to do that.
thanksimport java.io.*;
File oldfile = new File("oldfilename");
oldfile.renameTo(new File("newfilename")); -
Who will update control file when renaming a redolog file
Hi when we rename a redolog file in mount state of database using the following command
ALTER DATABASE
RENAME FILE '/diska/logs/log1a.rdo', '/diska/logs/log2a.rdo'
TO '/diskc/logs/log1c.rdo', '/diskc/logs/log2c.rdo';
how the new location and new name of redo log files will be updated to control file and who will update that inforamtion
thanks in advance.Where did you get this?
oracle 4774 4733 0 12:04 pts/0 00:00:00 sqlplus as sysdba
oracle 4797 1 0 12:04 ? 00:00:00 ora_pmon_DB1
oracle 4799 1 0 12:04 ? 00:00:00 ora_vktm_DB1
oracle 4803 1 0 12:04 ? 00:00:00 ora_diag_DB1
oracle 4805 1 0 12:04 ? 00:00:00 ora_dbrm_DB1
oracle 4807 1 0 12:04 ? 00:00:00 ora_psp0_DB1
oracle 4811 1 0 12:04 ? 00:00:00 ora_dia0_DB1
oracle 4813 1 0 12:04 ? 00:00:00 ora_mman_DB1
oracle 4815 1 0 12:04 ? 00:00:00 ora_dbw0_DB1
oracle 4817 1 0 12:04 ? 00:00:00 ora_lgwr_DB1
oracle 4819 1 0 12:04 ? 00:00:00 ora_ckpt_DB1
oracle 4821 1 0 12:05 ? 00:00:00 ora_smon_DB1
oracle 4823 1 0 12:05 ? 00:00:00 ora_reco_DB1
oracle 4825 1 0 12:05 ? 00:00:00 ora_mmon_DB1
oracle 4827 1 0 12:05 ? 00:00:00 ora_mmnl_DB1
oracle 4829 1 0 12:05 ? 00:00:00 ora_d000_DB1
oracle 4831 1 0 12:05 ? 00:00:00 ora_s000_DB1
oracle 4855 4774 0 12:05 ? 00:00:00 oracleDB1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 4858 4729 0 12:05 pts/1 00:00:00 bash
oracle 4875 4858 0 12:05 pts/1 00:00:00 ps -fu oracleA ps output. The db is in mounted state.
Dim -
Automatically renaming an uploaded file
I am creating a page to upload files, as well as to submit
data about the file to be stored in a database. When the form data
is submitted, how can I program it to automatically rename the
uploaded file to the ID or Key number of the row in the database in
which the file's information is stored?What scripting language are you using?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"AngryCloud" <[email protected]> wrote in
message
news:evmlp4$lfh$[email protected]..
>I am creating a page to upload files, as well as to
submit data about the
>file
> to be stored in a database. When the form data is
submitted, how can I
> program
> it to automatically rename the uploaded file to the ID
or Key number of
> the row
> in the database in which the file's information is
stored?
> -
How to Ask to Rename a Dropped File?
Hello,
How would I create an AppleScript that asks me to rename any dropped files? I know something like this can be done in Automator, but I'd like to be able to manually input a name.
I'm looking to do this to increase my ScanSnap workflow efficiency. After scanning a PDF, it is OCR'd and saved into the Preview iCloud Library as "Preview PDF xxx", where "xxx" is sequential numbering. It's really annoying to open up Preview every time I'm done scanning and renaming ten different files. I'd just like to be able to drop/open the files onto/into an AppleScript, have it ask me what I'd like to rename it.
Thanks,
JoshTry:
on open of theFiles
repeat with aFile in theFiles
tell application "System Events" to set {name:fileName, name extension:nameExtension} to aFile
set baseName to text 1 thru ((get offset of "." & nameExtension in fileName) - 1) of fileName
display dialog "Rename file: " & baseName buttons {"Cancel", "OK"} default answer baseName default button "OK"
tell application "System Events" to set aFile's name to (text returned of the result) & "." & nameExtension
end repeat
end open
Maybe you are looking for
-
How do I install driver(s) for hp psc 2400 all in one series ( WIndows 7 laptop) AND a safe version of wsnmp32.dll -- Without a Disk? A tech took the driver off my laptop and I now have no printer/scanner. Help!! Much thanks!
-
IPhone's calendar week view error
Hello guys. When i choose the week view on Calendar (IOS 7.03) the Day number marked is wrong. The number 29 is below "Q" when the correct is below "T". But the extense text below shows correct. Does it occurs with you?
-
Store a variable in the session
Hi, i'm working with jsp+struts. I can't store, from an ActionServlet, a variable in the session. I want store a String in the session. I write in the ActionServlet : request.setAtribute ("popo"). I can't recover the value of the variable. I try : re
-
How to control the maximum size of a component in a GridBagLayout
Here is a small program that demonstrates my issue (it's originally from a big program that I couldn't attach here). I have a GridBagLayout with some components in it. Some of the components are JEditorPane (displaying some HTML) within JPanel and ar
-
ITunes charged £1.58 to my new credit card when i switched to it.
When i switched credit card numbers, iTunes charged £1.58 to my account. I have text alerts... weird!