Notifications
Clear all

[Closed] network problem

Hi, guys

is there special way to create a file on a network place ?
This code works fine when I browse to a local path but fails with network paths:


 path = getSaveFileName caption:"save" types:"text files (*.txt) |*.txt"
 	
 if path != undefined do
 (
    file = createFile (ConvertPaths path)
 )
 

where ‘ConvertPaths’ is:


 fn ConvertPaths input_path =
 (
 	local mod_path = ""
 	
 	if input_path != undefined then  
 	(		
 		for i = 1 to input_path.count do 
 		(
 			if input_path[i] == "\\" then mod_path = mod_path + "\\\\"  
 			else mod_path = mod_path + input_path[i] 
 		)	
 	)
 	
 	mod_path
 )
 

this is the error:

>> MAXScript Rollout Handler Exception: – Runtime error: FileStream cannot create: \\File-server\public\lll.txt <<

2 Replies

Try forward slashs. “/” and you won’t have to repeat them.

example: //machine/folder/folder/folder/file.txt

thanks man