dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: how would i create a (should be) simple script:

  1. #1
    Join Date
    Jan 2016
    Posts
    3

    how would i create a (should be) simple script:

    I'm not versed in Basic: but its the easiest to use due to not needing any special compiler:
    my only tool for it is Notepad (or the Notepad++ tool if needed)
    What i need is a .VBS to change a folder name back and forth: for like duplicate programs or tools that have different versions that only work with the direct folder Such as:
    C:\Program files (x86)\ThisProgramAFolder

    layman's terms so there is no confusion from me to others: because I tend to explain things weird.

    i need it to take the duplicate
    C:\Program files (x86)\ThisProgramAFolder(1)
    and the original:
    C:\Program files (x86)\ThisProgramAFolder
    and swap their names back and forth so i can use each application/tool easier and more conveniently.

    I would appreciate any help possible: thanks a bunch.

    special specs that may be helpful for you: but not helpful for me

    Windows 8.1 Pro x64
    AMD based CPU/GPU

  2. #2
    Join Date
    Jan 2016
    Posts
    3

    Re: how would i create a (should be) simple script:

    Apologies for grammar issues, particularly capitalization: my old keyboard shift key only works about 1/3 of the time.

  3. #3
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,337

    Re: how would i create a (should be) simple script:

    The function you are looking for is Name

    Name Source AS Destination

    Would most likely need to use run as administrator also since it is in program files
    Always use [code][/code] tags when posting code.

  4. #4
    Join Date
    Jan 2016
    Posts
    3

    Re: how would i create a (should be) simple script:

    I'm not sure how i would do that like I said I am not versed in Basic: but its easier to make a VBS than a CPP exe. even then I do not know how to change files outside the program in CPP

  5. #5
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,337

    Re: how would i create a (should be) simple script:

    Well I told you what function to use and showed the syntax. Have you tried it?
    What did you try? What result did you get?
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)