Full path to a file

Bill Campbell bill at celestial.com
Tue Jan 19 13:46:17 PST 2021


A one-liner to get the realpath of a file:

python -c 'import sys, os.path; print(os.path.realpath(sys.argv[1]))' fname

On Tue, Jan 19, 2021, Richard Kreiss via Filepro-list wrote:
>I have a routine that checks the date a file was created.
>
>It is now showing an incorrect date for this file. I would like to display the  full path to where this routine is getting its value.  Is there a way to have filePro display this information?
>
>I do have a routine that checks for the existence of the file.
>
>If:
>Then: ex=exist(filename)
>If : ex ne "0"
>Then: ERRORBOX "file named"<filename"<not found\n Program will exit" ;exit
>
>I do not have this issue in another program that uses the same code that is why I would like to see the path to the file with the incorrect date.
>
>
>Richard Kreiss
>GCC Consulting
>
>
>-------------- next part --------------
>A non-text attachment was scrubbed...
>Name: winmail.dat
>Type: application/ms-tnef
>Size: 13352 bytes
>Desc: not available
>URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20210119/b2aa92f7/attachment.bin>
>_______________________________________________
>Filepro-list mailing list
>Filepro-list at lists.celestial.com
>Subscribe/Unsubscribe/Subscription Changes
>http://mailman.celestial.com/mailman/listinfo/filepro-list
>

-- 
Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www2.celestial.com/ 6641 E. Mercer Way
Mobile:         (206) 947-5591  PO Box 820
Fax:            (206) 232-9186  Mercer Island, WA 98040-0820

If a juror feels that the statute involved in any criminal offence
is unfair, or that it infringes upon the defendant's natural
god-given unalienable or constitutional rights, then it is his
duty to affirm that the offending statute is really no law at all
and that the violation of it is no crime at all, for no one is
bound to obey an unjust law. -- Chief Justice Harlan F. Stone


More information about the Filepro-list mailing list