Just starting out? Need help? Post your questions and find answers here.
Kwai chang caine
Always Here
Posts: 5494 Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France
Post
by Kwai chang caine » Wed Sep 04, 2013 4:05 pm
Hello at all
Are they a limit for the path for the instruction CopyFile ?
Because i have
Code: Select all
CopyFile(PathA+ PathB, PathC + PathB)
And
Code: Select all
Len(PathA + PathB) = 164
Len(PathC + PathB) = 261
Apparently that work if the second parametre is "c:\Temp"
Code: Select all
CopyFile(PathA+ PathB, "C:\Temp\File.dll")
Good day
Last edited by
Kwai chang caine on Wed Sep 04, 2013 4:52 pm, edited 1 time in total.
The happiness is a road...
Not a destination
ts-soft
Always Here
Posts: 5756 Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany
Post
by ts-soft » Wed Sep 04, 2013 4:41 pm
The limit on windows (ASCII) is 260, including nullbyte!
PureBasic 5.73 |
SpiderBasic 2.30 |
Windows 10 Pro (x64) |
Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Kwai chang caine
Always Here
Posts: 5494 Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France
Post
by Kwai chang caine » Wed Sep 04, 2013 4:51 pm
It's the reason why
Thanks a lot TsSoft
The happiness is a road...
Not a destination
IdeasVacuum
Always Here
Posts: 6426 Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:
Post
by IdeasVacuum » Wed Sep 04, 2013 9:10 pm
You can test it against #MAX_PATH
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Kwai chang caine
Always Here
Posts: 5494 Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France
Post
by Kwai chang caine » Wed Sep 04, 2013 9:52 pm
Yes i have forgotten this constant
Thanks too IdeasVacuum
The happiness is a road...
Not a destination
normeus
Enthusiast
Posts: 472 Joined: Fri Apr 20, 2012 8:09 pm
Contact:
Post
by normeus » Wed Sep 04, 2013 11:54 pm
I try to use UNC most of the time:
Code: Select all
pathc = "G:\movies\there are 254 characters minus one or two\for this path\"
should look like this:
Code: Select all
pathc = "\\?\G:\movies\there are 254 characters minus one or two\for this path\"
people get really wordy with their paths at my place and UNC could go up to 32k chars
Norm.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
IdeasVacuum
Always Here
Posts: 6426 Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:
Post
by IdeasVacuum » Thu Sep 05, 2013 12:52 am
...that would be long UNC or UNCW
IdeasVacuum
If it sounds simple, you have not grasped the complexity.