|
|
Check if new file is present
I added this to str1.asm to check if new filename exists
but it fails whether date named file is present or not.
there_already: ; check to make sure that the file with the date format
; isn't already there
; mov dx,offset storage + 2
; mov ax,7143h ; See if file exists
; int 21h ; carry flag set if problem
; jc short file_there
is_a_path:
xor ax,ax
xor dx,dx
mov ax,7156h ; LFN rename file Win 98 +
lea dx, orig_name + 2 ; old name
lea di, storage ; sets the new name
int 21h
thanks.
|
|
0
|
|
|
|
Reply
|
andrewkennedy2
|
2/4/2004 5:02:44 AM |
|
Andrew Kennedy wrote:
> I added this to str1.asm to check if new filename exists
> but it fails whether date named file is present or not.
>
>
> there_already: ; check to make sure that the file with the date format
> ; isn't already there
>
> ; mov dx,offset storage + 2
> ; mov ax,7143h ; See if file exists
> ; int 21h ; carry flag set if problem
> ; jc short file_there
jnc?
What's bl? I suppose you want 0 - that'll only trash cx. Why not 714Eh?
The need to close the "handle"? How about just checking the return from
7156h? (I assume it won't rename to an existing name - haven't tried it
- should return CF and 50h in ax?)
Best,
Frank
P.S. I see you got crossposting working. Good!
|
|
0
|
|
|
|
Reply
|
Frank
|
2/4/2004 11:32:57 AM
|
|
Andrew Kennedy <andrewkennedy2@ev1.net> schreef in berichtnieuws
6e8b2ce.0402032015.3a9b455e@posting.google.com...
> I added this to str1.asm to check if new filename exists
> but it fails whether date named file is present or not.
That's not so good ... What are the error-codes returned in both
circumstances ? Maybe they will tell you what the actual problem is.
(thanks for using cross-posting)
Regards,
Rudy Wieser
|
|
0
|
|
|
|
Reply
|
R
|
2/4/2004 11:35:29 AM
|
|
R.Wieser <rwieser-killthis-@xs4all.nl> schreef in berichtnieuws
4020d742$0$156$e4fe514c@dreader5.news.xs4all.nl...
Hello Andrew,
I've not yet received a response from you. Where you able to solve your
problem ?
Regards,
Rudy Wieser
> Andrew Kennedy <andrewkennedy2@ev1.net> schreef in berichtnieuws
> 6e8b2ce.0402032015.3a9b455e@posting.google.com...
> > I added this to str1.asm to check if new filename exists
> > but it fails whether date named file is present or not.
>
> That's not so good ... What are the error-codes returned in both
> circumstances ? Maybe they will tell you what the actual problem is.
>
> (thanks for using cross-posting)
>
> Regards,
> Rudy Wieser
|
|
0
|
|
|
|
Reply
|
R
|
2/6/2004 9:23:01 AM
|
|
"R.Wieser" <rwieser-killthis-@xs4all.nl> wrote:
>R.Wieser <rwieser-killthis-@xs4all.nl> schreef in berichtnieuws
>4020d742$0$156$e4fe514c@dreader5.news.xs4all.nl...
>
>Hello Andrew,
>
> I've not yet received a response from you. Where you able to solve your
>problem ?
I did respond but it was never posted. I don't know if it's my
IP or what. There are just two NGs where this is happening.
I was getting 2 in al for when the file was present. I will
get back to you SOMETIME when and if I get a chance.
Andy
|
|
0
|
|
|
|
Reply
|
andrewkennedy1
|
2/6/2004 1:49:36 PM
|
|
<andrewkennedy1@ev1.net> schreef in berichtnieuws
102762s28pqvpd1@corp.supernews.com...
>
> "R.Wieser" <rwieser-killthis-@xs4all.nl> wrote:
> >R.Wieser <rwieser-killthis-@xs4all.nl> schreef in berichtnieuws
> >4020d742$0$156$e4fe514c@dreader5.news.xs4all.nl...
> >
> >Hello Andrew,
> >
> > I've not yet received a response from you. Where you
> > able to solve your problem ?
>
> I did respond but it was never posted. I don't know if it's my
> IP or what. There are just two NGs where this is happening.
I'm sorry to hear that.
> I was getting 2 in al for when the file was present. I will
> get back to you SOMETIME when and if I get a chance.
You do know what error-code 0002h (in AX, not AL :-) means, do you ? It
means "File is not found".
It probably means that you *think* you are checking for a certain file, but
you are not. Most probably a wrong filename/path, or even looking for a
hidden file without specifying so.
Regards,
Rudy Wieser
|
|
0
|
|
|
|
Reply
|
R
|
2/6/2004 5:42:03 PM
|
|
|
5 Replies
136 Views
(page loaded in 0.044 seconds)
Similiar Articles: How to check in a stored proc if data is already present? - comp ...I appears to do this already in the ... DIAGNOSTICS; SEE ALSO ... If present, it should be ... The path to a file stored on the hard drive has been relatively easy to see ... network error 10048 - comp.databases.filemaker... folder which contains files cloned from the present database files(Its populated later).the new ... when i click open and > then hosts,i cant see any file from the new ... no client-side code to check if a file path exists? - comp.lang ...... lastIndexOf("\\")); window.status = file + " : " + fold; var oFSO = new ... there is a *.txt in a file exist? - comp.soft-sys ... no client-side code to check if a file ... Checking to see if a value exists - comp.databases.filemaker ...... assigning an email address to each new ... How to check in a stored proc if data is already present? - comp ... ... check file is open or not - comp.soft-sys ... How do I check the existence of a file programmatically in C ...I want to check to see if a file exists before I try to open it. If it doesn't exist, I ... more easily be written: > > fork(); fork(); That will only create three new ... How to bound a Cores generated output in Modelsim - comp.arch.fpga ...... all IO parts of the FPGA which are not physically present, you just copy this wrapper into a new file ... In ISE, I can see tenths.xco file at the source tab. I can see tenths ... Checking whether user has access to file/folder - comp.lang.java ...... manager FileCheck <<path to file/folder>> The problem: Read access check succeeds for any files ... have also tried using FilePermission: > FilePermission fp = new ... Help determining modelines for Xorg - comp.unix.solarisAs an early christmas present for myself, I bought an Acer ... I then tried using xvidtune to see if maybe I could ... Wiki Archives - HOWTO_Xorg_HDTV... work with your new ... How can i check if my file handle has been stale - comp.lang.tcl ...how to check j2ee version - comp.lang.java.programmer I tar --update my backup .tar file. I see a new version of every file ... Hi, I have been using the Ruby version that ... Changing default view for Explorer window in SAS 9.2 - comp.soft ...At present, each time I open a session of SAS I need to ... Check to top of you SAS log to see if SAS said that it ... have the -RSASUSER option in my SAS configuration file ... Linux/UNIX: Find Out If File Exists With Conditional ExpressionsLinux: 20 Iptables Examples For New SysAdmins; My 10 UNIX Command ... That was a great help, I needed a script to check if the .parentlock file was present in the Thunderbird ... Does File Exist Check in SSIS - BI Developer Network CommunityIrrespective of the number of files present, the load ... I have one question (and I am very new to SSIS), using your example, how can I check for multiple specific file ... 7/12/2012 3:46:10 PM
|
|
|
|
|
|
|
|
|