Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

how can i create folder on client pc?


3 replies to this topic

#1 mutant

mutant

    Newbie

  • Members
  • Pip
  • 1 posts
  • Gender:Male

Posted 03 March 2006 - 02:27 AM

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

#2 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

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

#3 DARREN

DARREN

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 396 posts
  • Gender:Male
  • Location:Florida,USA

Posted 03 March 2006 - 06:22 PM

There is a way to create a folder using DDE_EXECUTE, but I cannot remember the syntax. I recall that it was in the PROIV 4.6 demo software for DDE.
Things should be made as simple as possible, but not simpler

#4 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

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



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Click the link below to see the new game I'm developing!