Rename file during archive

hi all,
I am trying to rename my file after load is done , i am writing an expression to get the current date but my client needs the file name in following format(month_date_year example : Nov_06_2014)  ,which i am unable to get it , please help me with expression
any help will be appreciated.
Here is the expression i wrote  
@[$Project::Archive_File_Path] + @[User::Variable]+ @[User::File_Name]+"_"+ 
(DT_WSTR,4)year(getdate())+"_"+right("0"+(DT_WSTR,4)month(getdate()),2)+"_"+ right("0"+(DT_WSTR,4)day(getdate()),2) +".xlsx" 
this expression is giving me the result as (path\abc\2014_11_06.xlsx) but this not i am looking for ,
i want something like 
PATH\ABC\NOV_6_2014.xlsx

Hi KITTU1228,
To achieve your requirement, please refer to the following expression:
@[$Project::Archive_File_Path] + @[User::Variable]+ @[User::File_Name]+"_"+ (MONTH(getdate()) == 1 ? "Jan" : MONTH(getdate()) == 2 ? "Feb" : MONTH(getdate()) == 3 ? "March" :
MONTH(getdate()) == 4 ? "Apr" : MONTH(getdate()) == 5 ? "May" : MONTH(getdate()) == 6 ? "Jun" :
MONTH(getdate()) == 7 ? "Jul" : MONTH(getdate()) == 8 ? "Aug" : MONTH(getdate()) == 9 ? "September" :
MONTH(getdate()) == 10 ? "Oct" : MONTH(getdate()) == 11 ? "Nov" :
MONTH(getdate()) == 12 ? "Dec" : "InvalidMonth") +"_"+ right("0"+(DT_WSTR,4)day(getdate()),2)+"_" + (DT_WSTR,4)year(getdate())+".xlsx"
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • During daily refresh/clone alter database rename file genrating logs under $ORACLE_HOME/dbs with name c-1437102747-20130920-16

    Did anyone have seen this behavior?
      DB version : 11.1.0.7
      OS : HP-UX Itanum
      EBS -11.5.10.2
    We are doing daily refresh/clone of a database instance from production. Recently we are seeing the growth of $ORACLE_HOME/dbs directory during this
    refresh.   During investigation we find out that
      1) When we rename the database files after database restoration. Each below command genrating the 24MB of log file under $ORACLE_HOME/dbs.
      Command :
      alter database rename file '/db02/prod/XDB.dbf' to '/db02/test/XDB.dbf';
    alter database rename file '/db02/prod/a_archive01.dbf' to '/db02/test/a_archive01.dbf';
      Logfiles under $ORACLE_HOME/dbs on target :
      -rw-r----- xxxxx 24379392 Sep 20 05:30 ./dbs/c-1437102747-20130920-02
      -rw-r----- xxxxx 24379392 Sep 20 05:30 ./dbs/c-1437102747-20130920-03
      2) After few minutes, these logs got removed from the directory.
      3) Did not find anything unusual in the alert log.

    These are controlfile autobackups.   Every time you make a physical change to the database structure, an autobackup is created.  In 11.2, the frequency is reduced -- for example if you make 5 changes in quick succession, one autobackup is created.
    CONTROLFILE AUTOBACKUP ON    would be visible when you do a SHOW ALL in rman.
    Hemant K Chitale

  • Download PDF File from Archiv to SAP Application Server

    Hi,
    I need to download the PDF file from an NAST-Dataset (how is stored from the message via SAP ArchivLink) to the SAP Application Server.
    1) At first i read the Archiv-Link data via function module WFMC_GET_ARCHIVE_OBJECT_TYPE
    2) Then i get the Connection-Infos via function module ARCHIV_GET_CONNECTIONS_INT
    3) Now i read the file from archiv as table via function module ARCHIVOBJECT_GET_BYTES
    4) Save to the SAP Appl.Server via:
       - OPEN DATASET ld_dpfad FOR OUTPUT IN BINARY MODE
       - LOOP and TRANSFER lf_archivobject TO ld_dpfad.
       - CLOSE DATASET ld_dpfad.
    In the dialog of NAST-Dataset (Messages) i can open the PDF-File without any errors (display originals). But after the filetransfer to the SAP Appl.Server i get the following errors during the file opening dialog from Adobe Acrobat Reader:
    - the embedded font u201CArialu201D cant to be extract
    - not enough data for the picture
    The reader can display the PDF-File but only without the picture (Logo) and with alternative font.
    The same transfer from archiv and sending as an attachement to the BOR-Object via function module SO_DOCUMENT_INSERT_API1 works very fine and without any errors.
    Can any one please help me to solve this Issue?
    Thanks in Advance,
    Thomas

    Hello Keith,
    Many thanks for your answer.
    In the past i didnu2019t need the BINARCHIVOBJECT-Parameter and so i overlook this option.
    Now, the File looks a little bit different, but only in the STREAM-section.
    During the Fileopen-Dialog i get only one message now - "not enough data for image" and the image will not displayed. The rest seems to be correct.
    The relevant coding is now:
      ld_doc_typ = pf_connections-reserve.
      CALL FUNCTION 'ARCHIVOBJECT_GET_BYTES'
        EXPORTING
          archiv_id                = pf_connections-archiv_id
          archiv_doc_id            = pf_connections-arc_doc_id
          document_type            = ld_doc_typ
          length                   = ld_length1
          offset                   = ld_offset
        IMPORTING
          binlength                = ld_length                        
          offset                   = ld_offset
        TABLES
          binarchivobject          = lt_binarchivobj                  
        EXCEPTIONS
          error_archiv             = 1
          error_communicationtable = 2
          error_kernel             = 3
          OTHERS                   = 4.
    Zieldatei zum Schreiben öffnen
        OPEN DATASET ld_dpfad FOR OUTPUT IN BINARY MODE.
    Inhalte in Zieldatei schreiben
      LOOP AT lt_binarchivobj INTO lf_binarchivobj.
        TRANSFER lf_binarchivobj TO ld_dpfad NO END OF LINE.          
      ENDLOOP.
    Zieldatei schließen
      CLOSE DATASET ld_dpfad.
    Where is the error for the image data?
    Ciao Thomas
    Push up by: Thomas Engler on May 3, 2010 4:54 PM

  • Reg:File adapter archive Directory

    Dear team,
    Our requirement is to read a csv file from a directory and archive the file in archive folder specified in the file adapter.
    If any exception is caught,then we need to read the archieve file from archive directory rename the archive file with source file name and place it in source directory.
    On the receive activity we are able to get the source file name and source file directory.
    <receive name="Receive1" createInstance="yes"
    variable="Receive1_Read_InputVariable" partnerLink="fileRead"
    portType="ns1:Read_ptt" operation="Read">
    <bpelx:property name="jca.file.FileName" variable="srcFileName"/>
    <bpelx:property name="jca.file.Directory" variable="srcDrFolder"/>
    How to get the archive file name and archive file directory from the receive activity so that we can store in local variables.
    Pls do help.
    Thanks

    Hi,
    Another way you can accomplish your scenario. Instead of deleting or archiving in beginning just move the file from inbound to archive location after business flow completion.
    In case of error, the file will remain at original position as moving operation is at the end.
    First read the file using read operation, then at the end create a file adapter with sync read operation. Change the entries in .jca generated with below sample.
    Sample jca file.
    <endpoint-interaction portType="SynchRead_ptt" operation="SynchRead">
    <interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
    <!-- Below properties are dummy except Type , it will be changed in runtime -->
    <property name="SourcePhysicalDirectory"
    value="srcdir"/>
    <property name="SourceFileName" value="abc.txt"/>
    <property name="TargetPhysicalDirectory"
    value="targetdir"/>
    <property name="TargetFileName" value="abc.txt"/>
    <property name="Type" value="MOVE"/>
    </interaction-spec>
    Then,in you bpel flow at the invoke for sync read add these two properties.
    <bpelx:inputProperty name="jca.file.SourceFileName"
    variable="varInputFileName"/>
    <bpelx:inputProperty name="jca.file.TargetFileName"
    variable="varArchiveFileName"/>
    <bpelx:inputProperty name="jca.file.SourceDirectory"
    variable="varInputDirectory"/>
    <bpelx:inputProperty name="jca.file.TargetDirectory"
    variable="varArchiveDirectory"/>
    - It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Thanks,
    Durga

  • Move Excel file to Archive and add timestamp to file name

    I have SQL Server 2012 and using Excel Source and OLE DB Connection to import Excel data to DB.
    Currently file is located on C:\\Excel\filename.xlsx. I'm using File System Task to move file to C:\\Excel\Archive\filename.xlsx after Import Task.
    Now I would like to add timestamp to file name after moving file to archive. I would like to modify file name as C:\Excel\Archive\filename_timestamp.xlsx
    How to add timestamp to filename?
    Kenny_I

    Hi, 
    here you go with example
    http://consultingblogs.emc.com/jamiethomson/archive/2005/09/14/SSIS-Nugget_3A00_-Move-and-rename-a-file-in-one-operation.aspx
    thank you
    Aamir
    http://sqlage.blogspot.com/

  • File adapter - archiving files after successful processing & errors

    Hi All
    In sender file adapter, I understand that we can archive files after processing them.
    After successful processing, we can archive the file, and if there are any errors, we can archive the file in a different folder (all files resulting in errors during processing are archived in a seperate folder).
    Now, see this scenario.
    My file is successfully picked up, processed and posted to receiving sap system thru proxy.
    But, if there is any application specific error (ex: duplicate id), because of which this data cannot be processed in the receiving system, how can i move the file which is archived in successful messages folder to the folder where we archive error messages?
    Is it possible?
    This is required because, when there are these kind of errors with incorrect data, we want the corresponding file to be archived in the folder where erred files are archived.
    Please let me know how we can achieve this.
    Many Thanks
    Chandra

    in file sender CC, thr is option to archive and error file store also..
    1)under processing mode - archive.. give the path thr..
    2) To archive source files where a permanent error occurred during processing, select Archive Faulty Source Files
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/658abd344a4de0e10000000a1553f7/frameset.htm

  • Log file switch (archiving needed)

    Hi,
    My database is on windows 2003, 10.2.0.4, recently I have been getting the following wait events on a regular basis, LOG FILE SWITCH (ARCHIVING NEEDED)...My redo files are 50MB with 5 groups...I have changed the log_archive_max_process from 2 to 3, but still the problem persists...can anyone help me regarding the same?As to what other changes can be done?and this happens only during the time of BOD and EOD.
    Thanks,
    AJ

    Hi Jonathan,
    Thanks for the reply, I am not worried abt the archiving thing for the time being,as my database was working absolutely fine before the new query that was added in the Begin of Day process. So I am trying to tweak the query.
    Folllowing is the procedure which gets called during the Begin of Day:
    CREATE OR REPLACE procedure Lms_Pr_Bod_Update_Tmp (p_import_type in number)
    as
    v_update_script varchar2(2000);
    v_upper_start_tag varchar2(10); -- san_22-apr-2009
    v_upper_end_tag varchar2(10); -- san_22-apr-2009
    begin
    declare
    cursor cur_update_tmp is
    select -- this query is for all of lov type of data
    a.destination_column_name, a.column_to_update , b.mapped_lov_syscode lov_syscode,
    c.destination_table_name,'LOV_DATA_SYSCODE' select_attribute,'LMS_LOV_DATA_MAP' select_table,
    'SOURCE_UNIQUE_ID' where_condition,'LOV_SYSCODE' lov_condition,'LOV' att_type
    from lms_import_column_info a
    inner join lms_attribute_master b
    on a.attribute_syscode = b.attribute_syscode
    and (a.column_to_update is not null or trim(a.column_to_update) = '')
    inner join lms_import_type_master c
    on a.import_type_syscode = c.import_type_syscode
    where a.import_type_syscode = p_import_type
    and b.mapped_lov_syscode is not null
    union all
    select -- this query is for all of dummy attribute
    a.destination_column_name, a.column_to_update , 1 lov_syscode,
    d.destination_table_name,c.attribute_name_internal select_attribute,
    case
    when b.applicable_for = 'INS' then 'LMS_ENTITY_INSTRUMENT'
    when b.applicable_for = 'ACC' then 'LMS_ENTITY_ACCOUNT'
    end case,
    b.attribute_name_internal where_condition,'1' lov_condition,'DUMMY' att_type
    from lms_import_column_info a
    inner join lms_attribute_master b
    on a.attribute_syscode = b.attribute_syscode
    and (a.column_to_update is not null and trim(a.column_to_update) <> ' ')
    and b.attribute_type = 'DUM' and dummy_column_type = 'FILT'
    inner join lms_attribute_master c
    on b.dummy_mapped_attribute_pk = c.attribute_syscode
    inner join lms_import_type_master d
    on a.import_type_syscode = d.import_type_syscode
    where a.import_type_syscode = p_import_type;
    begin
    v_upper_start_tag := 'UPPER('; -- san_22-apr-2009
    v_upper_end_tag := ')';          -- san_22-apr-2009
    for cr_update_tmp in cur_update_tmp loop
    if p_import_type = 4 and cr_update_tmp.column_to_update IN ('INSTRUMENT_SYSCODE','ACCOUNT_SYSCODE')
    and Upper(cr_update_tmp.destination_table_name) = 'LMS_ENTITY_TRANSACTION_TMP' then
    v_upper_start_tag := ''; -- san_22-apr-2009
    v_upper_end_tag := ''; -- san_22-apr-2009
    end if;
    v_update_script := 'UPDATE ' || cr_update_tmp.destination_table_name || ' A SET ' || ' A.' || cr_update_tmp.column_to_update || ' =
    (select ' || CR_UPDATE_TMP.SELECT_ATTRIBUTE || ' from ' || CR_UPDATE_TMP.SELECT_TABLE || '
    where ' || V_UPPER_START_TAG || CR_UPDATE_TMP.WHERE_CONDITION || V_UPPER_END_TAG || '=' || V_UPPER_START_TAG || CR_UPDATE_TMP.DESTINATION_COLUMN_NAME || V_UPPER_END_TAG ||
    ' AND ' || cr_update_tmp.lov_condition || ' = ' || cr_update_tmp.lov_syscode || ')';
    v_upper_start_tag := 'UPPER('; v_upper_end_tag := ')';
    execute immediate (v_update_script);
    end loop;
    end;
    end;
    Following is the flow of the query:
    1. A temporary table is created where in the updates can be made.
    2. Rows are inserted into ths table from the source table
    3. Updates are performed on this table
    4. Updates are then copied to the source table
    5. This procedure is alled twice, so before getting called for the second time, table is truncated.
    Thanks,
    AJ

  • Rename files or folders in Windows 8 not working

    Rename a file or folder on a Windows CE device is not working from Windows 8 when connected through Windows Mobile Device Center.
    From Windows 7 it worked just fine!
    This has been a problem for a very long time now, and im not alone according to all forums.
    But no fix as far as i can find!
    Is there anyone that have found a fix on this?

    http://answers.microsoft.com/en-us/windows/forum/windows8_1-files/windows-8-unable-to-rename-files-on-pocket-pc/abae21b7-7ee1-41c7-853e-1ac7ea5b0413
    It seems a issue in window 8.x system. Maybe you can ask for a MS support ticket. 

  • Sharepoint 2013 ItemAdded event receiver for renaming files is not working

    In SP 2013 I coded an event receiver that intercepts the ItemAdded event and it just renames the file.
    It is a synchronous event (I added <Synchronization>Synchronous</Synchronization> in the Elements.xml).
    This is the code:
            public override void ItemAdded(SPItemEventProperties properties)
                SPSecurity.RunWithElevatedPrivileges(delegate()
                    try
                        OutputDebugStringA("Inside ItemAdded");
                        string szHttpUrl = properties.WebUrl + "/" + properties.AfterUrl;
                        SPWeb openedWeb = properties.Web.Site.OpenWeb(properties.Web.ID);
                        SPFile spf = openedWeb.GetFile(szHttpUrl);
                        EventFiringEnabled = false;
                        string szUrl = properties.AfterUrl;
                        szUrl = szUrl + ".renamed";
                        string szNewFileName;
                        if (szUrl.LastIndexOf('\\') != -1) szNewFileName = szUrl.Substring(szUrl.LastIndexOf('\\') + 1);
                        else if (szUrl.LastIndexOf('/') != -1) szNewFileName = szUrl.Substring(szUrl.LastIndexOf('/') + 1);
                        else szNewFileName = szUrl;
                        if (properties.ListItem != null)
                            properties.ListItem["Title"] = szNewFileName;
                            properties.ListItem.Update();
                        spf.MoveTo(szUrl);
                        EventFiringEnabled = true;
                        base.ItemAdded(properties);
                        OutputDebugStringA("Renaming to " + szUrl);
                    catch (System.Exception exception)
                        OutputDebugStringA("ItemAdded ERROR: " + exception.ToString());
    The problem is that when I upload a .txt file using Internet Explorer, just after the renaming is done, IE says that something went wrong and when I inspect the log files I see:
    SPRequest.GetFileAndFolderProperties: UserPrincipalName=i:0).w|s-1-5-21-4050800873-4278272723-3073177257-500, AppPrincipalName= ,bstrUrl=http://sp2013/sites/demo/subsite1 ,bstrStartUrl=Shared Documents/test2.txt ,ListDocsFlags=16400 ,bThrowException=True 0fa7689c-674b-5045-c3a2-b214a5d4cbed
    01/09/2014 15:29:26.75  w3wp.exe (0x1544)                        0x16F4 SharePoint Foundation        
     General                        ai1wu Medium   System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr><nativestack></nativestack>,
    StackTrace:    at Microsoft.SharePoint.SPWeb.GetFileOrFolderProperties(String strUrl, ListDocsFlags listDocsFlags, Boolean throwException, SPBasePermissions& permMask)     at Microsoft.SharePoint.SPFile.PropertiesCore(Boolean
    throwException)     at Microsoft.SharePoint.SPFile.get_Length()     at Microsoft.Office.RecordsManagement.PolicyFeatures.ApplicationPages.UploadPage.OnSubmit(Object o, EventArgs e)     at Microsoft.Office.RecordsManagement.PolicyFeatures.ApplicationPages.UploadExPage.OnSubmit(Object
    o, EventArgs e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeSta... 0fa7689c-674b-5045-c3a2-b214a5d4cbed
    ...gesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext
    context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr
    rootedObjectsPointer, IntPtr nativeRequestContex... 0fa7689c-674b-5045-c3a2-b214a5d4cbed
    ...t, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr
    pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr
    rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) 
     0fa7689c-674b-5045-c3a2-b214a5d4cbed
    So it is clear that the fact that I renamed the file is causing an issue in the SharePoint upload logic.
    As a solution what I did was to not declare it as Synchronous, but if I do it then there is another error when Sharepoint shows the Edit Properties dialog... in this case the upload is OK but when it is time to show that Edit Property dialog IE fails and
    says that the file has been already modified, or that "something went wrong".
    If I use a synchronous event I get one problem. If I use the asynchronous event I get another problem... It's very frustating and I am pretty sure that a so important API like Event Receivers should have support renaming files so I hope someone can tell
    me what I am doing wrong.
    Thanks in advance

    May be you want to consider using the following code and see if it works for you.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/40c78e03-2dca-4083-89d2-a7430099da68/how-do-i-change-the-name-property-of-a-file-in-a-document-library?forum=sharepointdevelopment
    Amit

  • Get renamed file new name

    Hello all. What I'm wanting to do is rename a file and then do some things with the new file name.
    1. I want to view the new file name with the full path
    2. I want to output the new file name with the full path to a text file or csv file
    Here is what I have for outputting the renamed file into a text file, but it isn't working:
    cls
    $resultsfile = "C:\results3.txt"
    clear-content $resultsfile
    foreach($item in gc C:\RENAME.txt){
    Rename-Item $item "1.txt" | out-file $resultsfile -append
    notepad $resultsfile
    Any thoughts on how to work with the newly renamed file name?

    Yes, sorry I forgot to mention that I'm trying to delete a bunch of files whose names are too long. So what I 'm trying to do is to rename the files first with "1.txt" and then I'm going to delete them. I just had a "forehead-slap" moment where I realized
    I could just pipe the "rename-item" into "remove-item" and that should accomplish my goals.
    But, as for my original question, if I rename a file, how can i view/use the renamed file name? Like if I renamed a file, how could I output the newly renamed file name to a text file? I tried this in my original code above, but it didn't work. Let's just
    assume that I have a single file that I want to rename to "1.txt"

  • Rename file name & format using ftp sender

    Hi all,
    This is regarding the renaming of file at sender file(FTP) communication channel and placeing the same file in the same folder.
    At FTP server at sender side (i.e.clients place) is in .txt format.But now .txt file has to rename and change into .sav foramt with below required name convention of file.
    client format is  :  SAP_Order.txt (Pervious file name).
    We need to change the file in to "SAP_Order_yyyymmddThhmmss.sav" format..
    How can i achieve this requirement?
    Can please suggests me solutions ASAP.
    Best Regards,
    satya,

    Hi,
       if your requirement is to pick the  existing file in the FTP folder...and send as idoc to the target and place the renamed file to FTP folder...
    then its simple...
    use two receivers instead of one , one for point to target and other for sender itself... (second receiver  is for  changing  the file name format....)
    Hope the above understanding is correct...if not provide more details of your requirement...
    HTH
    Rajesh

  • File Adapter Archiving Issue

    Hi,
    THe file adapter archives the file, it doesn't save the entire contents of the file in the archive folder, but saves the first recordset (row) only in XML format. Did any body face similar issue, and what's the resolution to archive the contents of the file, the way it was sent.
    Thanks
    Pandari

    Hi Anil,
    Refer Archiving concepts in below links.
    http://help.sap.com/saphelp_nw73/helpdata/en/44/682bcd7f2a6d12e10000000a1553f6/content.htm?frameset=/en/44/6830e67f2a6d12e10000000a1553f6/frameset.htm
    http://scn.sap.com/docs/DOC-35572
    Warm Regards,
    DNK Siddhardha.

  • Deleting & renaming files - is there a shortcut to finder?

    I am a recent convert from PC to Mac. So far so good. However, one thing starts to drive me up the wall which is deleting/renaming files in programs such as photoshop, word, excel etc.etc.
    As far as I can tell, this is only possible in the finder menu. Is this Correct? I am using a lot of folders and subfolders - sometimes 3-4 levels deep. Every time I need to change/delete a file or filename - lets say while in photoshop, I have to go to finder and click my way through several levels of folders to the actual file I need to change. This is somewhat annoying and timeconsuming.
    Question 1: is there a way to do these operations in - lets say photoshop directly?
    Question 2: If not, is there a shortcut key that would point me automatically to the file in finder where I can make the changes?
    Your input would be very helpful and save me some aggravation.
    fupe

    Hi Greg,
    Thanks for your input. You are correct as far as "save" and "save as" is concerned. Windows and Mac work the same way.
    However, as far as I can tell, in Mac you can only "delete" or "rename" a file in "finder" which forces you to open up finder and locate the file in order to delete or change it.
    In windows you can do these 2 functions directly in the program (such as photoshop, excel or words). You do not have to go to "explorer or root directory" to make these changes which I believe would be the equivalent of "finder".
    In any case, Terence solved the problem. By command clicking the name (title) of the file in any program, it opens up the directory in "finder". This way makes it easy to select the file and do the changes.
    fupe

  • How to open renamed files?

    Hi
    I rename selected files and after that want to open them.
    For my purpose renaming works well like this:
    tell application "Finder"
    set FilesToRENAME to selection
    display dialog "Change what?" default answer ""
    set ChangeFROM to text returned of the result
    display dialog "Change to?" default answer ""
    set ChangeTO to text returned of the result
    set AppleScript's text item delimiters to {ChangeFROM}
    set theCount to count of FilesToRENAME
    repeat with x from 1 to theCount
    try
    set theName to name of item x of FilesToRENAME
    set FirstNamePart to first text item of theName
    set LastNamePart to second text item of theName
    set newName to FirstNamePart & ChangeTO & LastNamePart
    set name of item x of FilesToRENAME to newName
    on error errStr number theNumber
    activate
    display dialog "Error in changing the Name " & theNumber & return & errStr ¬
    & return & "Step " & x
    end try
    end repeat
    set AppleScript's text item delimiters to ""
    end tell
    Now newly renamed files don't belong anymore to FilesToRENAME. So how to point to those files now (how to make a new list from those renamed files)? I was thinking to get a path to each file inside the repeat loop and replace the name, but couldn't do it.
    Thank you for any help.
    Vera

    Pierre's method is pretty clever, but if you don't happen to be using a Finder selection (choose file for example), you can also use the interesting fact that an alias keeps track of an item even if it is moved or renamed.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    -- tell application "Finder" to set filesToRename to selection as alias list
    set filesToRename to (choose file with multiple selections allowed)
    set changeFrom to text returned of (display dialog "Change what?" default answer "")
    set changeTo to text returned of (display dialog "Change to?" default answer "")
    set renamedFiles to {} -- this will be the renamed files
    repeat with aFile in filesToRename
    set aFile to the contents of aFile
    tell application "Finder" to set theName to name of aFile
    try
    set tempTID to AppleScript's text item delimiters
    set AppleScript's text item delimiters to {changeFrom}
    set firstNamePart to first text item of theName
    set lastNamePart to second text item of theName
    set AppleScript's text item delimiters to tempTID
    set newName to firstNamePart & changeTo & lastNamePart
    tell application "Finder"
    set name of aFile to newName -- aFile points to the original file
    update aFile -- give Finder a chance to catch up
    set the end of renamedFiles to aFile -- aFile now points to the renamed file
    end tell
    on error errStr number theNumber
    activate me
    display alert "Error " & theNumber & " in changing the Name" message errStr
    end try
    end repeat
    renamedFiles --> aliases to the renamed files
    </pre>

  • FM to rename   files in ABAP

    Hi..I am pretty new to the world of ABAP.
    I have the following task.
    I need to right a function module that will be responsible for renaming files on the R/3 system (to a certain predefined format). Basically, I am thinking that FM will import/accept an old file name (incl path) as a parameter, and then FM will take care of actually renaming the file and returning the name of the new filename.
    Since I am very new to all the ABAP, can any of you give me some pointers, or maybe some sample code if anybody done something similar?
    All the help is appreciated.
    thank you

    Are you talking about files on the application server.  If so, you will need to copy them into the new name and delete the old one.  Here is a sample program.
    report zrich_0001.
    parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt',
                d2 type localfile default '/usr/sap/TST/SYS/Data2.txt'.
    data: begin of itab occurs 0,
          rec(20) type c,
          end of itab.
    data: wa(20) type c.
    start-of-selection.
    * open and read file 1 into an internal table
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into wa.
          if sy-subrc <> 0.
            exit.
          endif.
          itab-rec = wa.
          append itab.
        enddo.
      endif.
      close dataset d1.
    * Open file 2 and copy the contents to this file
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
    * Delete file 1
      delete dataset d1.
    Welcome to SDN!  Please remember to award points for any helpful answers that you might recieve.  Also, when your question has been answered completly, be sure to mark as "Solved".  Thanks.
    Regards,
    Rich Heilman

Maybe you are looking for