HOW: File handling - Date and time of file created/modified
Hi all,
Is there any way by which we can find out the date and time of the file created in operating system using file handling through PL/SQL.
Eg:-
I have a directory in which I am storing some files, and for a given file name I must know when that file was created, i mean date and time.
Might be there is some simple way, please help out.
regards
CJ
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584#73995149457661
Remember to get the correct privs (java privs) on the directory.
Mette
Similar Messages
-
How to rename a flat file concatenating date and time the file name?
I created a package where I run a first interface that uses a flat file from a server and load into a table in Teradata.
After using the API OdiFtpPut, I used an FTP file and send to an outfit.
Since this procedure will operate daily, I need at the time of FTP, get the concatenation destination file name, date and time of execution.
What is the best practice for this?Using OdiFtpPut in the field where it informs the destination file name, instead of putting just the file name (lpn_pln.csv), I put as follows:
- lp_pln_+<% = odiRef.getSysDate (ddMMyyyyhhmm ")%>+. csv
For code example, today would record the name lp_pln310120111412.csv
Anything you can add my msn ---> aluizs @ ig. com. br (no spaces)
Edited by: andre_l_soares on 31/01/2011 08:16 -
Inserting automatic file name, date and time in Illustrator CS3?
hello all,
is there an option in Illustrator where you could automatically insert inside your file the file name, date and time where it was last created or modified, etc.
I found this option to exist in InDesign, but could not find the same menu in Illustrator. I am using CS3.
help?
thanks a bunch.Mario,
would you please be so kind to include a reference on your site about the script? As far as I can see, the PutDateandTime.js you are providing here is a copy or a slightly modified copy of the original script that Wolfgang Reszel has provided on our site for about four years.
It is okay that the script is available on your site, but please not without a reference. Thanks. -
How do you handle date and time in a global implementation
Hello:
Does somebody have a strategy on handling date and time in a global environment? Does Oracle timestamp it based on the Time Zone it is in? If so, if I have a distributed data architecture and data is getting replicated across these sites that are in different time zones, how does it handle the situation?
Thanks.
venkiThere are a variety of TIMESTAMP data types-- TIMESTAMP, TIMESTAMP WITH TIME ZONE, and TIMESTAMP WITH LOCAL TIME ZONE. TIMESTAMP WITH TIME ZONE or TIMESTAMP WITH LOCAL TIME ZONE will probably work for you. If you are going to display the data to a user, however, TIMESTAMP WITH LOCAL TIME ZONE is probably the best option since it automatically converts to the local time zone. If you just have application code that is looking at the timestamps, either one will work.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
How do you date and time stamp iCal entries? We share an event calendar and need to know when a new event was entered into iCal.
BKBK,
Thank you for your response. That does adequately cover the
client-originated sessions, but still leaves the ability I am
looking for unavailable.
It did serve to definitively answer my most pressing
question, however, with this statement:
Note: ColdFusion cannot create a session if an initiator
application uses a SendGatewayMessage method to start an
interaction with a client, such as an SMS user. In this case, the
sending code must keep track (for example, in a database) of the
messages it sends and their destinations. When a response event
arrives, it can look up the origniatorID to determine whether it
was in response to an outgoing message.
I will play around with the Application scope to see if there
might be a workable solution there.
RLS -
How to compare date and time together
Hi,
How to compare Date and Time together?
For example in a database table there are two fields rundate and runtime. I want to compare these two with perticular date and time in the program. Like, I want to pull all the records where the records's date and time are less than a perticular date and time in the program.
Hope the question is clear...
Thanks.
KavitaHi Kavita
There is no as such Date and Time Comparision FM in Standard SAP But You can define your own like this
<b>FUNCTION ZAV4_COMPAREDATETIME.
""Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(DATE1) TYPE DATS
*" REFERENCE(TIME1) TYPE TIMS
*" REFERENCE(DATE2) TYPE DATS
*" REFERENCE(TIME2) TYPE TIMS
*" EXPORTING
*" VALUE(TWOISMORETOPICAL) TYPE C
twoismoretopical = ''.
if date2 > date1.
twoismoretopical = 'X'.
else.
if date2 = date1 and time2 > time1.
twoismoretopical = 'X'.
endif.
endif.
ENDFUNCTION.</b>
Regards
Mithlesh -
How to display date and time on jsf page
Hi,
how to display date and time on jsf page
we are using 11.2.0.0 jdeveloper on windows.
thanks
Edited by: user12187801 on 26-Jul-2012 01:42Your question is certainly lacking some information.
If you want a constantly updating date/time - then JavaScript is your best bet, and Google would find you examples like [url http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html]this
If you meant something else, then it's back to you to explain. -
How to set date and time on apple tv
how to set date and time on apple tv
Assuming this is not the first time you have used your Apple TV
1. You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
2. Also try restarting the router.
3. If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
If this is a new Apple TV, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123. -
How to find date and time on iphone's photo taken?
in iPhoto no matter the source of the photo you see the information about th ephoto by selecting the photo and showing info (the get info button may be in a different location depending on the version of iPhoto you have)
If you are not aking an iPhoto question but are asking an iPhone question instead then repost in the iPhone forum - iPhoto has no association with the iPhone
LN -
How to provide date and time stamp to the extracted file.
I 'm downloading data from DB to Flat file using GUI_DOWLOAD. whenever it is executed it is creating with a file name.
if i rerun the program the file is overwriting with the same name.
now based on the requirement how many times i executed, that many times file should be individually created and should be added with date and time stamp.
like
if when i executed at the very first time it should saved with filename, date and time.
say "Address.txt 04/05/2007 07:55:10"
When i executed it for second time it doesn't overwrite the file.
it should create a new file.
like "Address.txt 04/05/2007 07:59:20".
Please guide me the way if possible code.
Thanks in advance.Hi Vamsi,
Use FM 'F4_PROGRAM' to take file from the user .
In this case user will enter the file name. u can append date & time to that file path.
Refer this code.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SY-REPID
DYNPRO_NUMBER = SYST-DYNNR
IMPORTING
FILE_NAME = P_P_FILE.
concatenate P_FILE '04/05/2007 07:59:20' into V_FILE.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = v_file
filetype = 'ASC'
write_field_separator = 'X'
TABLES
data_tab = i_tab
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF sy-subrc = 0.
MESSAGE i002.
ENDIF.
Reward points if helpful.
Regards,
Hemant. -
How to know date and time information from Trace File defaultTrace.X.trc?
Hi, all.
i'm using EP 6.0 SP9 patch 1.
As you know, default trace is written in the <SID>\JC00\j2ee\cluster\server0\log\defaultTrace.X.trc.
By using the default trace formatter, it shows like the following sample messages.
#1.5#0011110E7B2000590000000100000A100003EC71562E6EBC#1104396451585#com.sap.jms.server.ServerClientAdapter##com.sap.jms.server.ServerClientAdapter#Guest#18####716257115a3f11d9b73b0011110e7b20#SAPEngine_Application_Thread[impl:3]_23##0#0#Error#1#/Applications/JMS#Plain###JMS internal error at ServerClientAdapter! JMS Service is not started!#
My questions are
1. how do we retrieve the date and time information from the above message? It seems that this message has date and time info because LogViewer shows the date and time based on the above message.
2. how do we change the above date format to easier one
like "YYYY:MM:DD:hh:mm:ss"? i know that it can be configured from the Visual Admin --> Services --> Log Configurator but i don't know the exact place for the trace file.
Thanks.Hi Sejoon,
I use the standalone Logviewer to read the log files. Works great.
"If you have an SAP Web Application Server Java 6.20 or below you may also get a standalone_logviewer.zip file at the SAP Service Marketplace at service.sap.com/download → SAP NetWeaver → Release 04. In this case JDK version 1.3 or higher must be installed on the system. The java version must be same on the server and the client.
In the SAP Web AS Java 6.30 installation a folder named logviewer_standalone can be found under: <path Of J2EE installation>/<SysID>/JC<nr>/j2ee/admin/logviewer_standalone. Verify that the batch file logviewer.bat is installed in the directory logviewer-standalone.
(source -> http://help.sap.com/saphelp_nw04/helpdata/en/e4/540c404a435509e10000000a1550b0/frameset.htm)
Best wishes,
Noel -
How to load date and time from text file to oracle table through sqlloader
hi friends
i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
this is my data in this path (c:\external\my_data.txt)
7369,SMITH,17-NOV-81,09:14:04,CLERK,20
7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
7566,JONES,02-APR-81,09:24:10,MANAGER,20
7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
create table emp2 (empno number,
ename varchar2(20),
hiredate date,
etime date,
ejob varchar2(20),
deptno number);the control file code in this path (c:\external\ctrl.ctl)
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>any help i greatly appreciated
thanks
Edited by: user10947262 on May 31, 2010 9:47 AMload data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)Try
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>
That's not an error, you can see errors within log and bad files. -
How to capture file modification date and time over the web
HI!
I am creating a web based application and I am using webutil package for al lot of my work being that I ma working with renamin,deleting and uploading files for a users machine to the database. There is one functionality thing that I have to do in this application that webutil does not take care of and that is capturing the modification date and time from a file on the users machine. Please help me capture the date and time of a file on the users machine.
Thanks!Since webutil allows you to write file on client PC directory, then you first create a directive file, then host that directive file. the directive file content is just the command lines when you manually do it on PC.
Refer the ideas--just the ideas not the same built-ins in this URL:
Hyperlink in forms -
Naming for Export dmp file in Date and Time
Dear All,
Please advise me how to give the file name in date and time stamp for the export dmp file and it's log file.Suggest me in Oracle 9i version.
for example the file name get like this 020420041155.dmp and 020420041155.log where date and time are 02/04/2004 11:55 respectively...
Kindly let me know the syntax of filename to be given along with the EXP command..
Thanking You,
RageshHello
I don't think you can get the exp command to automatically name an export for you. The only way I think you would be able to do it is through a shell script or something where you format the file name yourself and pass it to exp. If you wanted to you could generate the command line through a SQL statement and then spool it out to a file i.e.
spool runexp.bat
select 'exp user/pwd@tns file='||TO_CHAR(SYSDATE,'DDMMYYYYHH24MI')||'.dmp tables=(table1,table2)' from dual;
spool offThe second option isn't as flexible as the first but if it's just a couple of exports you have to do, it will probably prove to be less work
HTH
David -
The date and time of files created and saved are off
I notice that under the date modified column, files that I have saved or updated are usually a day off. I checked the date and time in the system preferences and it is correct. is something wrong with the battery?
Hi, paulmont -
Be sure the Time Zone setting is correct.
If you have time displayed as 12-hour (rather than 24-hour), be sure the AM/PM setting is correct. Having that wrong will displace the mod/create date/time recorded for a file by 12 hours, which will (at times) shift it to another day.
If you use Classic, make sure the same settings are in Classic as well as in OSX, particularly the Time Zone setting. This is especially true for machines which can be and are booted into OS 9. The typical symptom for this being the cause is an offset of one or a few hours.
Maybe you are looking for
-
I have an IPad 2 and I cannot airprint...how do i do this
I have a new IPad 2 and I do not know how to set up AIRPRINT...please tell me how to do it?
-
Adobe Interactive forms (HCM P&F) browser support
Hi, im using hcm process and forms framework for adobe interactive forms. i would like to the browsers supported. IE is supported. how about Firefox.google chrome,safari,opera... Regards. Nachy
-
Desktop background stops functioning when switchiing monitors
Thanks, apple forums - you archived my thread before it was solved! I have an original Core Duo Macbook Pro 17" with 10.6.2, and an external Samsung 1600x1200 LCD. When at home, I use the built-in 1680x1050 LCD for working. When at work, I keep the l
-
Can I change where ADOBE 7.0 prints to?
When I choose Adobe 7.0 print option I can't find where it puts the resulting file. Any ideas?
-
can you help me my phone doesnt want to restore from recovery. it keep on saying the server is unavailale