Hi,
how can i create folder on client pc?
Check client pc whether the folder exist or not?
if folder exist then will write a file into the folder else
create a folder and write a file into the folder.
Thanks
how can i create folder on client pc?
Started by mutant, Mar 03 2006 02:27 AM
3 replies to this topic
#2
Posted 03 March 2006 - 02:34 PM
Mutant,
Here is a solution, but I hope that someone has better. This is also off the cuff, so there may be a syntactical error or three.
#STAT = SYSTEM('dir ' + $DIRECTORY + ' > %TEMP%dirlist.txt')
#GETPATH = CLIENT.Getpath('%TEMP%', $$PATH
$$FILE = $$PATH + 'dirlist.txt'
#GET = CLIENT.GET($$FILE, $$LOCAL_FILE)
do a call to read $$LOCAL_FILE to see if the directory exists and set scratch variable $DIR_GOOD according
IF ($DIR_GOOD # 'Y') THEN #STAT = SYSTEM('mkdir ' + $DIRECTORY);
#SEND = CLIENT.SEND($$YOUR_FILE, $DIRECTORY + $$YOUR_FILE)
hth,
Joseph
Here is a solution, but I hope that someone has better. This is also off the cuff, so there may be a syntactical error or three.
#STAT = SYSTEM('dir ' + $DIRECTORY + ' > %TEMP%dirlist.txt')
#GETPATH = CLIENT.Getpath('%TEMP%', $$PATH
$$FILE = $$PATH + 'dirlist.txt'
#GET = CLIENT.GET($$FILE, $$LOCAL_FILE)
do a call to read $$LOCAL_FILE to see if the directory exists and set scratch variable $DIR_GOOD according
IF ($DIR_GOOD # 'Y') THEN #STAT = SYSTEM('mkdir ' + $DIRECTORY);
#SEND = CLIENT.SEND($$YOUR_FILE, $DIRECTORY + $$YOUR_FILE)
hth,
Joseph
#4
Posted 03 March 2006 - 06:28 PM
Mutant,
Darren kind of kickstarted something in my mind. Just try to create the folder everytime. If it already exists, ignore the error.
In this case, simply:
#STAT = SYSTEM('GUI WINDOWS ASYNC mkdir ' + $DIRECTORY)
#SEND = CLIENT.SENT($$FILE, $DIRECTORY + $FILE)
HTH,
Joseph
Darren kind of kickstarted something in my mind. Just try to create the folder everytime. If it already exists, ignore the error.
In this case, simply:
#STAT = SYSTEM('GUI WINDOWS ASYNC mkdir ' + $DIRECTORY)
#SEND = CLIENT.SENT($$FILE, $DIRECTORY + $FILE)
HTH,
Joseph
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users