Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    separare un filename dal suo path

    Salve a tutti,

    avendo una stringa del tipo c:\sito\foto\foto1.jpg è possibile separare il filename (foto1.jpg) dal suo path (c:\sito\foto\) e conservarli in due diverse stringhe?

    Grazie,
    Jotto

  2. #2
    Utente di HTML.it L'avatar di Umanista
    Registrato dal
    Jan 2002
    Messaggi
    1,022
    codice:
    strPath = c:\sito\foto\foto1.jpg 
    
    'Nome del file
    strFilename = Right(strPath , Len(strPath ) - InstrRev(strPath , "/"))
    
    'Path senza nome del file
    strNewPath = Left(strPath, Len(strPath) - Len(strFilename))

  3. #3

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.