Jump to content

Recommended Posts

I would like to know if it is possible to use the filecopy and dircopy command to be able to copy a file/directory with a 8.3 name.

I found that the Filegetshortname returns the short name correctly, but when I use this name to copy it will revert back to the regular filename and not the shortfilename I specified.

Does anyone know of a solution for this? (other than using the xcopy command)

Link to post
Share on other sites

Hi, why u want to do that ?

Andre

<{POST_SNAPBACK}>

I was expecting this question.....

I am building an unattended Windows installation script. The files need to be copied in the short format as Windows does not deal with long filenames during the

text setup part of things.

Link to post
Share on other sites

Try This (Note: I a have not tested but it should work)

$Dir1=[Dir to Copy From]
$Dir2=[Dir to copy to]
FileCopy ($Dir1 & [\File],FileGetShortName ($Dir2 & "[\File]))
Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...