Indigo Rose Software
  #1  
Old 09-19-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
Folder.Create using variable are part of name

I'm trying to create a folder using a variable for part of the name. I want to create a folder in the source folder named DBU_(the current date) and have been unsuccessfull. This is what i have so far:

Code:
date = System.GetDate(DATE_FMT_US);
Folder.Create("%SourceFolder%:\\DBU_"..date.."");
Once the folder is created, i want to copy files from the source directory into the created folder but im not sure how to tackle that task. Any help would be appreciated. Thanks
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
  #2  
Old 09-19-2008
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
DATE_FMT_US has backslashes "/" in it which are unsupported in a folder name


You either need to replace them with a dash "-", or use DATE_FMT_ISO
Reply With Quote
  #3  
Old 09-19-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
i changed the DATE_FMT_US to DATE_FTM_ISO but it is still not creating the folder.
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
  #4  
Old 09-19-2008
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
Code:
date = System.GetDate(DATE_FMT_ISO)
Folder.Create(SessionVar.Expand("%SourceFolder%") .."\\DBU_"..date);
Reply With Quote
  #5  
Old 09-19-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
Works great! Thanks alot.

As for my second question, if i wanted to copy files into the created folder, what would be my destination?
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
  #6  
Old 09-19-2008
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
Code:
date = System.GetDate(DATE_FMT_ISO)
sDestinationFolder = SessionVar.Expand("%SourceFolder%") .."\\DBU_"..date;
Folder.Create(sDestinationFolder);
Reply With Quote
  #7  
Old 09-19-2008
GalacTekM's Avatar
GalacTekM GalacTekM is offline
Indigo Rose Customer
 
Join Date: Sep 2005
Location: Spring Hill, FL
Posts: 28
Thanks again, i'm slowly learning.
__________________
Matt Leach
GalacTek Corp.
www.galactek.com
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to divide MD5-variable to 8 part that any part have 4 letter. Esfahan AutoPlay Media Studio 6.0 3 11-16-2007 05:14 PM
problem with variable UweGeercken Setup Factory 6.0 2 07-12-2004 05:15 AM
Can't copy files with variable?? SonG0han AutoPlay Media Studio 5.0 1 03-06-2004 04:58 AM
Registry Variable Failure ggallo Setup Factory 5.0 3 08-30-2001 02:51 PM


All times are GMT -6. The time now is 03:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software