Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Kiss your keyboard goodbye!


devel / comp.lang.xharbour / Short file names

SubjectAuthor
* Short file namesMarco
+- Re: Short file namesdlzc
`* Re: Short file namesJayadev U
 `- Re: Short file namesMarco

1
Short file names

<d4b97ea2-ed81-479a-8c0c-d3b6e815a40fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16673&group=comp.lang.xharbour#16673

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a37:8407:: with SMTP id g7mr5851540qkd.123.1624542161618;
Thu, 24 Jun 2021 06:42:41 -0700 (PDT)
X-Received: by 2002:a05:620a:1117:: with SMTP id o23mr5906543qkk.57.1624542161488;
Thu, 24 Jun 2021 06:42:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 24 Jun 2021 06:42:41 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=92.223.202.50; posting-account=lAXggwoAAAA38TK43OjI5YNBHUtHVZ9n
NNTP-Posting-Host: 92.223.202.50
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d4b97ea2-ed81-479a-8c0c-d3b6e815a40fn@googlegroups.com>
Subject: Short file names
From: marcopegurri76@gmail.com (Marco)
Injection-Date: Thu, 24 Jun 2021 13:42:41 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Marco - Thu, 24 Jun 2021 13:42 UTC

Hi, there is a function in xharbour returning the short file name in 8.3 format of a long file name?

EXAMPLE:

LF_ToShort("long_file_name.txt") -> "LONGFI~1.TXT"

thanks.

Re: Short file names

<d3db6b44-dc20-408c-9ec5-aa7e5b8e679en@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16674&group=comp.lang.xharbour#16674

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ac8:5815:: with SMTP id g21mr6307451qtg.266.1624561743032;
Thu, 24 Jun 2021 12:09:03 -0700 (PDT)
X-Received: by 2002:ac8:57d2:: with SMTP id w18mr6306679qta.306.1624561742890;
Thu, 24 Jun 2021 12:09:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 24 Jun 2021 12:09:02 -0700 (PDT)
In-Reply-To: <d4b97ea2-ed81-479a-8c0c-d3b6e815a40fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=68.107.209.13; posting-account=7bF0GwoAAABMFHX6V4fON4-1F6LFJ834
NNTP-Posting-Host: 68.107.209.13
References: <d4b97ea2-ed81-479a-8c0c-d3b6e815a40fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d3db6b44-dc20-408c-9ec5-aa7e5b8e679en@googlegroups.com>
Subject: Re: Short file names
From: dlzc1@cox.net (dlzc)
Injection-Date: Thu, 24 Jun 2021 19:09:03 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
 by: dlzc - Thu, 24 Jun 2021 19:09 UTC

Dear Marco:

On Thursday, June 24, 2021 at 6:42:42 AM UTC-7, Marco wrote:
> Hi, there is a function in xharbour returning the short file name in
> 8.3 format of a long file name?

There is not always a "short file name" generated.

If you get no other answer, you can "RUN" a directory command, pipe the output to a file, and parse the file.
DIR cfilename.typ /X >PARSEME.TXT
date... time... size... short file name... long file name.
Seems to be very columnatic, so should be easy to parse as an SDF or something.

David A. Smith

Re: Short file names

<sb3l33$l3q$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16675&group=comp.lang.xharbour#16675

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: _ujayadev_@gmail.com (Jayadev U)
Newsgroups: comp.lang.xharbour
Subject: Re: Short file names
Date: Fri, 25 Jun 2021 09:42:17 +0530
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <sb3l33$l3q$1@dont-email.me>
References: <d4b97ea2-ed81-479a-8c0c-d3b6e815a40fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 25 Jun 2021 04:12:19 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f488cc0494763f322e85b50fc71e7714";
logging-data="21626"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Hc8XG94enp00ci3PeE0bukZ6HanR8e4c="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:9CjytNmCGdmkR7MBEgLVYsKcF54=
In-Reply-To: <d4b97ea2-ed81-479a-8c0c-d3b6e815a40fn@googlegroups.com>
Content-Language: en-US
 by: Jayadev U - Fri, 25 Jun 2021 04:12 UTC

On 24-06-2021 07:12 pm, Marco wrote:
> Hi, there is a function in xharbour returning the short file name in 8.3 format of a long file name?
>
> EXAMPLE:
>
> LF_ToShort("long_file_name.txt") -> "LONGFI~1.TXT"
>
> thanks.
>

Hi,

Please try with the following:

#pragma begindump

#include <windows.h>
#include "hbapi.h"

HB_FUNC( GETSHORTPATHNAME )
{
char buffer[ MAX_PATH + 1 ] = {0};
GetShortPathName( hb_parcx(1), buffer, MAX_PATH );
hb_retc( buffer );
}

HB_FUNC( GETSHORTFILENAME )
{ char pszReturn[ MAX_PATH ] ;
pszReturn[0]= '\0' ;

GetShortPathName( hb_parcx( 1 ), pszReturn, MAX_PATH - 1 ) ;
hb_retc( pszReturn ) ;
}

#pragma enddump

HTH,

Warm regards,

Jayadev

Re: Short file names

<0dcd0ad6-ebce-4ad4-b7cc-7dc9c8605516n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16689&group=comp.lang.xharbour#16689

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a0c:bf4b:: with SMTP id b11mr17674460qvj.11.1625562524456;
Tue, 06 Jul 2021 02:08:44 -0700 (PDT)
X-Received: by 2002:ac8:5e12:: with SMTP id h18mr16782986qtx.365.1625562524273;
Tue, 06 Jul 2021 02:08:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Tue, 6 Jul 2021 02:08:43 -0700 (PDT)
In-Reply-To: <sb3l33$l3q$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=92.223.202.50; posting-account=lAXggwoAAAA38TK43OjI5YNBHUtHVZ9n
NNTP-Posting-Host: 92.223.202.50
References: <d4b97ea2-ed81-479a-8c0c-d3b6e815a40fn@googlegroups.com> <sb3l33$l3q$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0dcd0ad6-ebce-4ad4-b7cc-7dc9c8605516n@googlegroups.com>
Subject: Re: Short file names
From: marcopegurri76@gmail.com (Marco)
Injection-Date: Tue, 06 Jul 2021 09:08:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Marco - Tue, 6 Jul 2021 09:08 UTC

Il giorno venerdì 25 giugno 2021 alle 06:12:21 UTC+2 Jayadev U ha scritto:
> On 24-06-2021 07:12 pm, Marco wrote:
> > Hi, there is a function in xharbour returning the short file name in 8.3 format of a long file name?
> >
> > EXAMPLE:
> >
> > LF_ToShort("long_file_name.txt") -> "LONGFI~1.TXT"
> >
> > thanks.
> >
> Hi,
>
> Please try with the following:
>
> #pragma begindump
>
> #include <windows.h>
> #include "hbapi.h"
>
> HB_FUNC( GETSHORTPATHNAME )
> {
> char buffer[ MAX_PATH + 1 ] = {0};
> GetShortPathName( hb_parcx(1), buffer, MAX_PATH );
> hb_retc( buffer );
> }
>
> HB_FUNC( GETSHORTFILENAME )
> {
> char pszReturn[ MAX_PATH ] ;
> pszReturn[0]= '\0' ;
>
> GetShortPathName( hb_parcx( 1 ), pszReturn, MAX_PATH - 1 ) ;
> hb_retc( pszReturn ) ;
> }
>
> #pragma enddump
>
>
> HTH,
>
> Warm regards,
>
> Jayadev

Thanks it works!

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor